Page 1 of 1
kmalloc programming
Posted: Mon Nov 11, 2002 4:30 pm
by Zi
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.
Re:kmalloc programming
Posted: Tue Nov 12, 2002 3:32 am
by Pype.Clicker
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 ?
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 . )
Re:kmalloc programming
Posted: Tue Nov 12, 2002 1:34 pm
by K.J.
[attachment deleted by admin]
Re:kmalloc programming
Posted: Wed Nov 13, 2002 8:47 am
by Zi
Thanks, your links helped me. But now : an other question : what is the sbrk() ? ???
Re:kmalloc programming
Posted: Wed Nov 13, 2002 10:50 am
by Tim
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/
Re:kmalloc programming
Posted: Thu Nov 14, 2002 1:20 am
by K.J.
plus any questions you might have for the next 6 months.
Hmm... they gave me plenty of stuff to work on for just 4 months.
K.J.