chap lists and arrays revisited figure dynamic storage allocation model memory is made up of series of variable-size blockssome allocated and some free in this exampleshaded areas represent memory currently allocated and unshaded areas represent unused memory available for future allocation small blockexternal fragmentation unused space in allocated blockinternal fragmentation figure an illustration of internal and external fragmentation freelist used for servicing future memory requests figure illustrates the situation that can arise after series of memory allocations and deallocations when memory request is received by the memory managersome block on the freelist must be found that is large enough to service the request if no such block is foundthen the memory manager must resort to failure policy such as discussed in section if there is request for wordsand no block exists of exactly size mthen larger block must be used instead one possibility in this case is that the entire block is given away to the memory allocation request this might be desirable when the size of the block is only slightly larger than the request this is because saving tiny block that is too small to be useful for future memory request might not be worthwhile alternativelyfor free block of size kwith mup to space may be retained by the memory manager to form new free blockwhile the rest is used to service the request memory managers can suffer from two types of fragmentation external fragmentation occurs when series of memory requests result in lots of small free blocksno one of which is useful for servicing typical requests internal fragmentation occurs when more than words are allocated to request for wordswasting free storage this is equivalent to the internal fragmentation that occurs when files are allocated in multiples of the cluster size the difference between internal and external fragmentation is illustrated by figure some memory management schemes sacrifice space to internal fragmentation to make memory management easier (and perhaps reduce external fragmentationfor exampleexternal fragmentation does not happen in file management systems