Summary

Memory is called fragmented when the blocks of memory that are not in use are interspersed with blocks of memory that are in use. Memory fragmentation occurs when programs use memory dynamically. When blocks of memory are being allocated and released dynamically, it is unlikely that this will be done in such a manner that released blocks of memory will again form continuous, larger memory blocks. Fragmentation has the following characteristics:

  • Memory fragmentation is often hidden.

  • Memory fragmentation gets worse over time.

  • Memory fragmentation can slow down or even halt programs.

  • Memory fragmentation can happen simply because you are trying to avoid it.

Memory managers (MMs) can be added to programs or systems to improve on the memory management scheme implemented by the target OS. Typical improvements are memory access and allocation speed, combating memory fragmentation, and sometimes even both. MMs can use different strategies for selecting a blocks of memory that should accommodate a memory request, as shown here:

Best Fit Large blocks are preserved as much as possible to accommodate large requests.
Worst Fit The remainder of a used block is as large as possible.
First Fit A block is selected as expediently as possible.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset