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?
what mm do you use?
Re:what mm do you use?
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.
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.