sec memory management handle memory block figure using handles for dynamic memory management the memory manager returns the address of the handle in response to memory request the handle stores the address of the actual memory block in this waythe memory block might be moved (with its address updated in the handlewithout disrupting the application program fit memory allocation methodwhere external fragmentation has led to series of small blocks that collectively could service the request in this caseit might be possible to compact memory by moving the reserved blocks around so that the free space is collected into single block problem with this approach is that the application must somehow be able to deal with the fact that all of its data have now been moved to different locations if the application program relies on the absolute positions of the data in any waythis would be disastrous one approach for dealing with this problem is the use of handles handle is second level of indirection to memory location the memory allocation routine does not return pointer to the block of storagebut rather pointer to variable that in turn points to the storage this variable is the handle the handle never moves its positionbut the position of the block might be moved and the value of the handle updated figure illustrates the concept another failure policy that might work in some applications is to defer the memory request until sufficient memory becomes available for examplea multitasking operating system could adopt the strategy of not allowing process to run until there is sufficient memory available while such delay might be annoying to the userit is better than halting the entire system the assumption here is that other processes will eventually terminatefreeing memory another option might be to allocate more memory to the memory manager in zoned memory allocation system where the memory manager is part of larger systemthis might be viable option in java program that implements its own memory managerit might be possible to get more memory from the system-level new operatorsuch as is done by the freelist of section the last failure policy that we will consider is garbage collection consider the following series of statements