This is an implementation of the classic buddy system (by Knuth). The idea is to keep separate lists of available blocks of each size 2k, 0 < k < m, where the total memory pool is 2m. There is a 1 bit overhead for each block allocated , indicating whether the block is in use or not. Originally the whole block of 2m is available. Later whenever a block of size X is requested it is rounded off to the nearest power of 2 and the block from the list of that size is returned. If the size is not available then a larger block is repeatedly split into two equal parts ; ultimately , a block of the right size 2k is finally returned. When one block split into two ( each of which is half as large as the original ), these two blocks are called buddies. Later when both buddies are available again, they coalesce back into a single block, thus the process can be maintained indefinitely. When the first allocated block is totally used then another block is allocated and the process repeats. The generic new and delete functions have been overloaded to perform the buddy allocation system on the BuddyMemoryManager object.The constructor sets up the lists and get the first block of memory the rest of the operations are done by the new and delete functions.