Computer method and system for allocating and freeing memory utilizing segmenting and free block lists
AssigneeMicrosoft Corporation
InventorPeter L. Morse
Life of this patent
Estimating the term…
Loading patent…
AssigneeMicrosoft Corporation
InventorPeter L. Morse
Estimating the term…
A method and system for allocating and freeing memory is provided. A requesting program running on a computer system allocates a logically contiguous block of memory (a "heap") for the temporary storage of data structures. A Heap Manager, provided by the present invention, manages the heap in response to requests from the requesting program. The Heap Manager logically divides the heap into segments and maintains a free list for each segment. The free list is a list of the free blocks contained in a segment. The heap has an associated free block array and an associated size tree. The free block array contains entries, each entry pointing to a free list. Each leaf node of the size tree corresponds to entries in the free block array. A value contained in each leaf node indicates the size of the largest free block in the segments corresponding to the entries. The Heap Manager selects a free block for allocation to the requesting program by searching to size tree and the free block array and selecting segment that contains a free block that will satisfy the request, and then searching the free list corresponding to the selected segment to locate the smallest free block that satisfies the request.
A method in a computer system of managing the allocation and freeing of memory within a heap, the heap having a plurality of free blocks and a plurality of allocated blocks and being logically subdivided into a plurality of segments, each block being associated with a segment, the method comprising:
A memory management system for managing a computer memory comprising:
A computer memory management system comprising:
In a computer system having memory and executing at least one program, a method of dynamically managing the allocation and freeing of memory within a heap of memory of the system, the heap having a plurality of free blocks and a plurality of allocated blocks, the heap being logically subdivided into a plurality of segments, each block being associated with a segment, the number of segments being a power of two and each segment having a free list, the free list linking the free blocks associated with the segment according to a size ordering and being accessible through a size tree and a free block list, the free block list having a plurality of entries, each entry corresponding to a segment and pointing to the free list for the segment, the size tree having a root node, a plurality of child nodes, and a plurality of leaf nodes, each node having a value such that the nodes of the size tree are arranged as a complete binary tree wherein the value of each node is not exceeded by the value of its child nodes, and each leaf node corresponding to two entries in the free block list and having a value indicating the size of the largest free block associated with the segments corresponding to the entries, the method comprising the steps of:
In a computer system, a method of allocating free memory from a heap of memory, the method comprising the steps of:
Dependencies are inferred from the claim text.