Memory manager overview

For Modula-2 the memory manager is the ExStorage module and forAda95 the memory manager is the Sbs.Storage package. The memory manager is very sophisticated,capable and fast. In fact, it has more features than most all applications need.The basic function of the memory manager is to efficiently allocate and deallocatememory used by your application. The memory manager acts as a buffer between yourapplication and the operating system.

The memory manager allocates memory from the operating systemin large blocks and then splits these blocks down to satisfy allocation requestsfrom your application. This is because operating systems memory allocation functionsare usually optimized for large block allocations and are not efficient at the smallerallocations normally used in applications. When you deallocate a memory block itis placed into a free block list in the memory manager and is then available to bereused in a future allocation. The memory manager will recombine multiple adjacentsmall blocks back into larger blocks when they are deallocated. This reduces memoryfragmentation. When an allocation request is made, the memory manager first searchesthe free list for a block of memory big enough to satisfy the request. If none isavailable the memory manager allocates another block of memory from the operatingsystem, and adds this block to the free list.

The memory manager is completely thread safe for multiple threadapplications.

The memory manager supports the following capabilities.

The following topics discuss the memory manager in greater detail.