How do you test a memory manager?

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
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

How do you test a memory manager?

Post by earlz »

I have recently started a complete rewrite of my OS, so I had to remake my memory manager, so now I need to test that it works..so how do I go about doing this!? my memory manager can be standalone(has no direct kernel function stuff) so I could test it with debugging functionality(through gdb)
but well I need to make sure it works really well,(as long as allocation time is below 5ms then speed doesn't matter to me..) because in my last OS I made a memory manager that I tested, and the tests worked but later found many bugs in it..
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Post by Ready4Dis »

I am actually working on a similar thing, it is a program to test my memory manager, it will do a lot of random (well, predictable as to be able to compare) allocations and de-allocations, take time measurements, check continuity, etc to see the efficiency of it. Once I get it a bit further along I can get you a running version of it, or you can send me your manager and I could plug it in and compare them and share the sources that way with you. It will definitely depend on your implementation, but I am almost to the point of implementing my memory manager in my kernel as well, and will also implement timing and continuity checking under my OS so it can be checked under 'real' conditions.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post by earlz »

My memory manager is a little bit tricky because instead of have 2 seperate memory managers(for physical and virtual) I use "address spaces" which will eventually be used by processes also..

here it is and how to do stuff..

errr...I got to get it ot where it isn't hanging first! lol
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Post by Ready4Dis »

hckr83 wrote:My memory manager is a little bit tricky because instead of have 2 seperate memory managers(for physical and virtual) I use "address spaces" which will eventually be used by processes also..

here it is and how to do stuff..

errr...I got to get it ot where it isn't hanging first! lol
Alright, sounds good, my memory manager is for virtual memory only, I had a version that handled both, but I didn't like it and opted to change to seperate versions, since I had 2 different goals in mind for both.
Post Reply