Dynamic memory allocation in a computer using a bit map index
First Claim
1. A method for allocating memory in a computer system, said method comprising the steps of:
- assigning portions of memory of equal size into one of a plurality of slots such that each slot includes zero or more memory blocks of equal size;
generating a bit map index comprising a plurality of bit flags, wherein each bit flag corresponds to one of said slots and indicates availability of at least one memory block for a corresponding slot;
receiving a request, including a size, for a memory block;
searching for available memory in response to said request by examining one or more of said bit flags in said bit map index to identify an available memory block to accommodate said memory block request; and
assigning a memory block not in use to accommodate said memory block request.
2 Assignments
0 Petitions
Accused Products
Abstract
A dynamic memory allocator in a computer assigns portions of memory into a large number of slots that include zero or more memory blocks of equal size. Free lists identify memory blocks, corresponding to a slot size, not currently in use in the computer. Software programs generate requests, including a size, for a memory block. The size of the requests are rounded up to the nearest slot size. To allocate a memory block, the free lists are searched, using a bit map index or a hierarchical bit map index, to identify an available memory block to accommodate the memory block requested. The dynamic memory allocator handles large block allocations different from small block allocations. A virtual memory allocator stores a plurality of pointers to identify one or more virtual pages of memory for allocation to the dynamic memory allocator.
-
Citations
21 Claims
-
1. A method for allocating memory in a computer system, said method comprising the steps of:
-
assigning portions of memory of equal size into one of a plurality of slots such that each slot includes zero or more memory blocks of equal size; generating a bit map index comprising a plurality of bit flags, wherein each bit flag corresponds to one of said slots and indicates availability of at least one memory block for a corresponding slot; receiving a request, including a size, for a memory block; searching for available memory in response to said request by examining one or more of said bit flags in said bit map index to identify an available memory block to accommodate said memory block request; and assigning a memory block not in use to accommodate said memory block request. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method for allocating memory in a computer system, said method comprising the steps of:
-
assigning portions of memory of equal size into one of a plurality of slots such that each slot includes zero or more memory blocks of equal size; generating a plurality of free lists, one for each slot, such that each free list identifies memory blocks, corresponding to a slot size, not currently in use; receiving a request, including a size, for a memory block; rounding up said size of said memory block requested to a nearest slot; searching one or more of said free lists to identify an available memory block to accommodate said memory block requested; and assigning a memory block not in use to accommodate said memory block requested. - View Dependent Claims (12)
-
-
13. A computer readable medium having a set of instructions stored therein, which when executed by a computer, causes the computer to perform the steps of:
-
assigning portions of memory of equal size into one of a plurality of slots such that each slot includes zero or more memory blocks of equal size; generating a bit map index comprising a plurality of bit flags, wherein each bit flag corresponds to one of said slots and indicates availability of at least one memory block for a corresponding slot; receiving a request, including a size, for a memory block; searching for available memory in response to said request by examining one or more of said bit flags in said bit map index to identify an available memory block to accommodate said memory block requested; and assigning a memory block not in use to accommodate said memory block requested. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20)
-
-
21. A computer system comprising:
-
a central processing unit; system memory; a software program resident in said memory and executed by said central processing unit, for a request, including a size, for a memory block; and a dynamic memory allocator for assigning portions of memory of equal size into one of a plurality of slots such that each slot includes zero or more memory blocks of equal size, said dynamic memory allocator for generating a bit map index comprising a plurality of bit flags, wherein each bit flag corresponds to one of said slots and indicates availability of at least one memory block for a corresponding slot, for searching for available memory in response to said request by examining one or more of said bit flags in said bit map index to identify an available memory block to accommodate said memory block request, and for assigning a memory block not in use to accommodate said memory block requested.
-
Specification