Anonymous user
Page Frame Allocation: Difference between revisions
Jump to navigation
Jump to search
m
Fix typos
[unchecked revision] | [unchecked revision] |
No edit summary |
m (Fix typos) |
||
Line 1:
==Physical Memory Allocators==
These are the
N will be the size of the memory in pages in the following text.
Line 9:
* a dword comparison can test up to 32 bits at once and thus speed up allocs
* keeping a pointer to the last allocated bit may improve the performance of the next search (keeping information about the fact all the previous bytes were searched
===Stack/List of pages===
Line 59:
===Flat List===
One straightforward way to manage big areas of addresses space is a linked-list (as depicted below). Each "free" region is associated with a descriptor giving its size and its base address. When some space needs to be allocated, the list is scanned for a region being large enough with a "first fit" or "best fit" (or
Note that with flat linked-lists, both "is memory at address XXX free" or "where can i get a block of size YYY" questions may require a complete traversal of the list to get answered. If virtual memory gets fragmented and the list gets longer, that may become an issue. "Is memory at address XXX free?" is mainly used to merge two free zone into a new (bigger) one when a block is released, and it is easier to deal with if the list is kept ordered by growing addresses.
|