/*memory manager interface *interface memmanadt /*store record and return handle to it *public memhandle insert(byte[info)/request space /*get back copy of stored record *public byte[get(memhandle )/retrieve data /*release the space associated with record *public void release(memhandle )/release space figure simple adt for memory manager sage actually stored method release allows the client to tell the memory manager to release the space that stores given message when all inserts and releases follow simple patternsuch as last requestedfirst released (stack order)or first requestedfirst released (queue order)memory management is fairly easy we are concerned in this section with the general case where blocks of any size might be requested and released in any order this is known as dynamic storage allocation one example of dynamic storage allocation is managing free store for compiler' runtime environmentsuch as the systemlevel new operations in java another example is managing main memory in multitasking operating system herea program might require certain amount of spaceand the memory manager must keep track of which programs are using which parts of the main memory yet another example is the file manager for disk drive when disk file is createdexpandedor deletedthe file manager must allocate or deallocate disk space block of memory or disk space managed in this way is sometimes referred to as heap the term "heapis being used here in different way than the heap data structure discussed in section here "heaprefers to the memory controlled by dynamic memory management scheme in the rest of this sectionwe first study techniques for dynamic memory management we then tackle the issue of what to do when no single block of memory in the memory pool is large enough to honor given request dynamic storage allocation for the purpose of dynamic storage allocationwe view memory as single array broken into series of variable-size blockswhere some of the blocks are free and some are reserved or already allocated the free blocks are linked together to form