I need more informations for programming malloc and free functions. I'm in pmode, I've got a gdt loaded, I don't want multitasking, and I need to read my floppy disk. I know my kernel is loded at the address 0x1000, and its size. What must I do to implement a malloc and a free function to be able to use the floppy disk, by the DMA ? Do you have a sample ?
You can see the current version of my OS at :
http://boost.zaphebergeur.net/indexo.php?page=dl
Thanks.
kmalloc programming
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:kmalloc programming
i probably misunderstood, but what has the floppy driver to do with the kalloc/kfree features ? do you mean you want to allocate memory that you can use for DMA buffering ? if this is your purpose, you'll have to ensure the memory you allocate is at a known physical address and that it maps contiguous page frames (nothing special to be done if you're just working without paging . )Zi wrote: What must I do to implement a malloc and a free function to be able to use the floppy disk, by the DMA ?
Re:kmalloc programming
Thanks, your links helped me. But now : an other question : what is the sbrk() ? ???
Re:kmalloc programming
Read my memory management tutorials. They should answer all your questions, plus any questions you might have for the next 6 months.
http://osdev.berlios.de/
http://osdev.berlios.de/
Re:kmalloc programming
Hmm... they gave me plenty of stuff to work on for just 4 months.plus any questions you might have for the next 6 months.
K.J.