kmalloc programming

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Zi

kmalloc programming

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:kmalloc programming

Post 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 . )
K.J.

Re:kmalloc programming

Post by K.J. »

[attachment deleted by admin]
Zi

Re:kmalloc programming

Post by Zi »

Thanks, your links helped me. But now : an other question : what is the sbrk() ? ???
Tim

Re:kmalloc programming

Post 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/
K.J.

Re:kmalloc programming

Post 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.
Post Reply