kmalloc

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
Balroj

kmalloc

Post by Balroj »

Hi again,

I'm starting now to think about a memory manager to my os. Is there some good info about howto writing a kmalloc and the user side malloc?

I don't know where to start.


thanks for all.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:kmalloc

Post by Solar »

Google for dlmalloc, or Doug Lea's malloc. There's a website with some good material on how the innards of dlmalloc() work, which should give you some insight on kmalloc() too.
Every good solution is obvious once you've found it.
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

Post by Pype.Clicker »

http://www.osdev.org/osfaq2/index.php/A ... Management

this might help.

Also check out http://osdever.net/, which is has plenty of MM (http://osdever.net/tutorials.php?cat=6&sort=1), as said in the Getting started page of the wikiFAQ ;)
Balroj

Re:kmalloc

Post by Balroj »

thank you guys.

A question about paggin, every process needs to have its own page directory? if yes, where to save them?
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

Post by Pype.Clicker »

well, yes. With the exception of Single Address Space OSes, process get their own page directory. Most of the time (see exceptions in mystran tutorial), a process X don't need to map the directory of process Y, so all you need to keep is its physical address in your process structure: that'll be enough to switch threads once required.
Balroj

Re:kmalloc

Post by Balroj »

thanks pype for your answear.

i'll now take a look to the you gave me and start working.

thanks once again for all
Post Reply