Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Pseudo-Dynamic Algorithm for Computer Memory Allocation

IP.com Disclosure Number: IPCOM000105883D
Original Publication Date: 1993-Sep-01
Included in the Prior Art Database: 2005-Mar-20
Document File: 4 page(s) / 100K

Publishing Venue

IBM

Related People

Feriozi, D: AUTHOR

Abstract

Described is a software implementation for use with computers to provide an algorithm that combines the best features of both dynamic and static memory allocation. The algorithm software is especially useful for use with device drivers that need a small number of reusable data structures that can be quickly and easily accessed.

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

Pseudo-Dynamic Algorithm for Computer Memory Allocation

      Described is a software implementation for use with computers
to provide an algorithm that combines the best features of both
dynamic and static memory allocation.  The algorithm software is
especially useful for use with device drivers that need a small
number of reusable data structures that can be quickly and easily
accessed.

      In prior art, memory resident software had dynamic storage
capabilities that was slow and wasteful in its static storage
allocation.  The concept described herein provides an algorithm that
combines the best features of both dynamic and static allocation by
providing two functions:  load time allocation/initialization and run
time allocation.  At load time, a pool of buffers is allocated and
initialized.  At run time, the buffers are made available for use and
then released back into the pool for reuse.  Figs. 1a and 1b show the
initialization time allocation of the data areas.  Fig. 1a shows the
initialization before allocation, and Fig. 1b shows the
initialization after allocation.

      During the initialization period, the data segment contains a
free memory area at the end that is large enough to hold a
predetermined maximum number of buffers.  The number of buffers
needed is determined from the machine configuration, command line
parameter, or by other means.  The buffer space extends from the free
memory marker for a length equal to the allocation size.  A new free
memory marker is created at the end of the buffer so that the
procedure can be repeated for other allocations.

      An array of pointers of a size greater than the number of
buffers is allocated.  The array is initialized so that each element
points to one of the buffers such that the last element is set to
zero.  At run time, the array is accessed in fashion to dole out the
buffers one at a time as they are need...