Browse Prior Art Database

Dynamic Memory Allocation using Fixed Size Blocks in a Shared Memory Space

IP.com Disclosure Number: IPCOM000116150D
Original Publication Date: 1995-Aug-01
Included in the Prior Art Database: 2005-Mar-30
Document File: 2 page(s) / 37K

Publishing Venue

IBM

Related People

Chen, C: AUTHOR [+2]

Abstract

A method for improving the memory efficiency of fixed size dynamic memory allocation and deallocation is disclosed. A portion of memory space is set aside for dynamic memory allocation. It is then partitioned into a single pool of fixed size memory blocks. This memory pool is used to support a range of allocation sizes instead of just a single size. The memory block size is based on the smallest increment between the different intended allocation sizes. All allocation sizes are multiples of the basic memory block size.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 91% of the total text.

Dynamic Memory Allocation using Fixed Size Blocks in a Shared Memory
Space

      A method for improving the memory efficiency of fixed size
dynamic memory allocation and deallocation is disclosed.  A portion
of memory space is set aside for dynamic memory allocation.  It is
then partitioned into a single pool of fixed size memory blocks.
This memory pool is used to support a range of allocation sizes
instead of just a single size.  The memory block size is based on the
smallest increment between the different intended allocation sizes.
All allocation sizes are multiples of the basic memory block size.

      When a request for memory is serviced, the requested size is
rounded up to an allocation size that is the smallest that will
contain the request.  Based on the selected allocation size, an
appropriate number of consecutive memory blocks are allocated
simultaneously.  After an identifier that represents the allocation
size is inserted, the address of the first block is returned to the
requestor.  Memory deallocation is handled by checking the size
identifier embedded in the returned memory address and reproducing a
number of consecutive memory block addresses in the pool.

      An array of addresses of available memory blocks is maintained
for a single memory pool.  Based on the selected allocation size, the
dynamic memory service routine recursively searches for a set of
contiguous block addresses.  This set of memory blocks are allocated
to the req...