摘要 |
Allocation information for a random access memory is stored in a separate memory or memory area. Each memory block in the RAM is divided into 2n equal-sized spaces, and a memory allocation tree structure is established which stores, in a separate random access memory (which can be a dedicated, non-allocable section of the first random access memory), a single space availability indicator at a first level representing 2n equal-sized spaces, a pair of pair of space availability indicators at a second level each representing 2n-1 equal-sized spaces, and so on until a plurality of space availability indicators are placed at a suitable lower level tree structure such that each represents a single equal-sized space. When a request for allocation of memory space is made, the allocation information for a memory block is checked to determine if a space availability indicator at the level which could accommodate the request is set to the first value. (If not, a different memory block is checked.) When a space availability indicator is found to be set to the first value, the represented space is allocated to service the request. In addition, the checked space availability indicator, and all the space availability indicators in the tree structure above and below it, are set to the second value.
|