Patent ID: 7386687

Claim:
A method, comprising: associating memory allocation table (MAT) entries with nodes in a binary tree such that the nodes and the entries are grouped into hierarchical levels; associating the nodes and the entries with segments of a shared memory of a multi-processor system such that higher level nodes and entries are associated with larger numbers of segments of the shared memory, a highest level node in the tree and an associated highest level entry in the MAT being associated with all of the segments of the shared memory, and lower level nodes and entries are associated with smaller numbers of segments of the shared memory, a plurality of lowest level nodes in the tree and an associated plurality of lowest level entries in the MAT being each associated with one segment of the shared memory; computing a level in the MAT based on a desired size of the shared memory to be reserved; selecting one of the entries associated with the computed level having status information indicating that the associated segment or segments of the shared memory are available for reservation; evaluating one or more higher level entries in a lineage of the selected entry to determine whether the higher level entries have status information indicating that the associated segments of the shared memory are available for reservation; repeating the evaluation step for successively higher level entries in the lineage until status information of one of the higher level entries indicates that the associated segments of the shared memory are available for reservation; and selecting one or more of the segments of the shared memory based on the status information of the entries of the MAT corresponding to a desired size of the shared memory to be reserved.