![]() ![]() The classic symptom of memory fragmentation is that you try to allocate a large block and you can't, even though you appear to have enough memory free. Whereas virtual memory (being much bigger) could look like this:. So in my example, if I had virtual memory with a page size of 2 bytes then I could make my 16 byte allocation with no problem. On systems with virtual memory, fragmentation is less of a problem than you might think, because large allocations only need to be contiguous in virtual address space, not in physical address space. Oops, I can't, even though there's nearly double that much free. Now, free the first four allocations but not the fifth:. ![]() Now, allocate some of it (5 allocations):. Imagine that you have a "large" (32 bytes) expanse of free memory:. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |