Page 1 of 1
[HELP] mm code
Posted: Thu Aug 11, 2016 9:22 am
by Askodem
Hi! I'm looking for a memory manager code/tutorial without bugs.
I found a mirror for JamesM fixed tutorials(code.google.com/p/jamesm-tutorials):
pmm.c:
https://github.com/berkus/jamesm-tutori ... /src/pmm.c
vmm.c:
https://github.com/berkus/jamesm-tutori ... /src/vmm.c
Is this tutorial easy to understand? How many bugs in it?
Re: [HELP] mm code
Posted: Thu Aug 11, 2016 3:14 pm
by max
Hello Askodem!
Askodem wrote:How many bugs in it?
Exactly 7.
Just joking, no one here takes the time to check that stuff.
What exactly do you want to implement? If you want to implement proper kernel memory management, you must first understand the basic concepts. Take a look at the
respective wiki pages. Start out by writing a physical memory manager, and then work your way up to paging.
Writing a physical memory manager mostly depends on you being creative to make something that works out. There are many ways how to do it, and there is no real "right way" You will probably rewrite this a hundred times anyway, so just try to build something that works at first
Greets
Re: [HELP] mm code
Posted: Thu Aug 11, 2016 4:51 pm
by szhou42
People, stop using tutorial's code directly(espically JamesM's paging code). Understand what the code does and write your own, otherwise you would have a
HARD time debugging. Debugging os is hard, debugging other's os code is even even harder.
I've been writing other parts of my os for 2 month based on my paging/kheap allocator code, with no significant bugs, you can take a look if you want. It's well commented too, I think.
https://github.com/szhou42/osdev/blob/m ... m/paging.c
Re: [HELP] mm code
Posted: Thu Aug 11, 2016 11:45 pm
by Askodem
Thanks for replies.
OK. I will try to implement my own mm.
szhou42 wrote:espically JamesM's paging code
This is the
new JamesM's code(2010 year). It contains not only paging.
I gave links to vmm.c and pmm.c files in the first post of this thread.