Simple Memory Manager - Allocation To allocate memory in a given size, the manager scans the list for the first chunk that is large enough. If there is none, it asks the operating system for a new chunk, and adds to the end of the list. The found chunk is removed from the list. In its first 4 bytes, the size of the allocated chunk is written. The user is being handed a pointer to the 5th byte of the chunk. If the original chunk was larger then required, its second part is broken, and re-added to the list, as a still free chunk.