Page 1 of 1

what mm do you use?

Posted: Thu Mar 30, 2006 3:18 pm
by GLneo
after Candamir posted a stack pmm I built 1 of them and now my OS has 3 pmm: linked-list, stack, page table, I like stack based, but the others have strong points, too
linked-list is fast but fragmented memory is no good

what do you think?

Re:what mm do you use?

Posted: Thu Mar 30, 2006 3:44 pm
by paulbarker
I'm planning a system with 3 levels of linked lists to replace my current system which has a circular dependency on itself and a horrible load of cruft to pre-allocate needed memory.

Each page will have a page_t struct. I will have 3 levels of freelist: single page, 8 pages (normally 64k) and 16x8 pages (512k). This reflects the way the pages are organised and needs some deep thought and clarification.

The bottom line is consider what the common case is (for mine, single page allocation) and any special cases you wish to support (for mine, physically continuous memory allocation for DMA and other tricks). Don't fret about rare events using a slightly sub-optimal method, just concentrate on the common case being fast.