I deleted all the code I had previously written for my physical memory manager and started from scratch. I coded the initialization and allocation for today and tomorrow will finish the deallocation and etc.
Now what my memory manager does is that it finds a block of of pages as big as the requested number of pages in the available memory space and then allocates that for the user (if the user has requested the pages to be committed and not reserved). However, I am wondering about fragmentation that will happen after allocating and deallocating a lot of memory. What are the ways of preventing scattered memory and fragmentation while managing the memory? I'd appreciate it if someone could give me some insights.
Prevent Memory Fragmentation
Prevent Memory Fragmentation
On the field with sword and shield amidst the din of dying of men's wails. War is waged and the battle will rage until only the righteous prevails.
Hi,
For physical frame allocation, see http://www.osdev.org/wiki/Page_Frame_Allocation for a few ideas.
Cheers,
Adam
For physical frame allocation, see http://www.osdev.org/wiki/Page_Frame_Allocation for a few ideas.
Cheers,
Adam