Memory allocation system and method

Electrical computers and digital processing systems: memory – Storage accessing and control – Memory configuring

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C711S172000, C711S171000, C345S543000, C710S056000, C707S793000

Reexamination Certificate

active

06804761

ABSTRACT:

BACKGROUND OF THE INVENTION
The present invention relates generally to computer memory systems, and more particularly, to the management of memory allocation.
Computer operating systems dynamically allocate memory in a computer system while executing programs. Computer memory is allocated to the executing program for use by functions within the program. When the functions are completed, the memory allocated for the functions are typically de-allocated. Frequent allocation and de-allocation of a large number of fixed size data structures may result in memory fragmentation, which can lead to performance degradation or even malfunctions.
Dynamic memory allocation is a technique in which programs determine as they are running where to store information. Dynamic allocation is used when the number of memory blocks needed, or the length of time needed, depends on the data being processed. For example, a block may be needed to store a line read from an input file. Since there is no limit to how long a line can be, the storage must be allocated dynamically, and made dynamically larger as more of the line is read. Also, a block may be needed for each record or each definition in the input data. Since it is not known in advance how many records there will be, a new block must be allocated for each record as it is read. In order to improve efficiency, when an amount of memory is requested, a higher amount of memory defined as a “chunk” may be allocated.
A chunk manager is often used to manage chunk memory allocation from an operating system to an application. The chunk manager allocates large blocks of memory chunks and then subdivides the blocks into smaller fixed size blocks (chunk elements) that can be used for fixed size data structures.
FIG. 1
illustrates a memory chunk C subdivided into a plurality of chunk elements E, with allocated blocks indicated with shading. An application may request 50 elements having 100 bytes each from a chunk manager, for example. The chunk manager will then request a 5,000 byte block containing a plurality of smaller size block elements and allocate this memory to the application. Individual block elements within the large block may be used by the application and then returned at various times while the application is running. As memory blocks are allocated and deallocated during system operation, the memory fragments and free blocks are located between used ones (see FIG.
1
). When the memory is fragmented, there may be a large amount of total free space, but each block may be too small for use by applications to store data. For example, an application may request a chunk of memory which is less than the total free memory, but not available as one chunk due to fragmentation of the system memory. As data structures in a system differ in the size and dynamicity of allocation and de-allocation, memory chunks of different sizes have to be used to conserve memory. Since the sizes of memory chunks differ, frequent allocation and de-allocation of elements often leads to memory fragmentation which may result in system performance degradation and malfunctions.
There is, therefore, a need for a chunk manager that allows for flexibility in the size of chunks allocated to increase the availability of memory blocks and reduce errors encountered due to memory fragmentation.
SUMMARY OF THE INVENTION
A memory allocation system and method are disclosed. A method of the present invention is for allocating computer memory for a function in a computer program by a chunk manager operable to interface with an operating system of a computer and the program. The method generally includes receiving a request for a block of memory for a function in the computer program. The request is modified such that the size of the requested block corresponds to a standard block size selected from a list of standard block sizes. The method further includes locating a first available block of memory having a size within a predefined range around the requested block size.
A system for allocating computer memory generally comprises a chunk manager operable to receive a request from a computer program for a block of memory and modify the request such that the size of the requested memory block corresponds to a standard block size. The chunk manager is further operable to locate a first available block of memory having a size within a predefined range around the requested block size.
In another aspect of the invention, a computer system generally includes a central processing unit coupled to a memory unit. The memory comprises a memory array for storing data comprising data bits. The memory stores the data within the array in memory chunks, each memory chunk being divided into a plurality of memory elements having predefined number of data bits. The system further includes a chunk manager operable to allocate variable sized memory chunks to a computer application. The chunks are allocated based on a predefined allowable range around a chunk size requested by a program.
A computer program product for allocating computer memory generally comprises computer code that allows the chunk manager to receive a request for a block of memory for a function in a computer program. The product further includes computer code that modifies the request such that the size of the requested block corresponds to a standard block size selected from a list of standard block sizes, computer code that locates a first available block of memory having a size within a predefined range around the requested block size, and a computer readable medium that stores the computer codes.
The above is a brief description of some deficiencies in the prior art and advantages of the present invention. Other features, advantages, and embodiments of the invention will be apparent to those skilled in the art from the following description, drawings, and claims.


REFERENCES:
patent: 5235690 (1993-08-01), Beardsley et al.
patent: 5481702 (1996-01-01), Takahashi
patent: 5652864 (1997-07-01), Hine
patent: 5675790 (1997-10-01), Walls
patent: 5784699 (1998-07-01), McMahon et al.
patent: 5802599 (1998-09-01), Cabrera et al.
patent: 5930827 (1999-07-01), Sturges
patent: 6088764 (2000-07-01), Shyam et al.
patent: 6094707 (2000-07-01), Sokolov et al.
patent: 6490670 (2002-12-01), Collins et al.
patent: 6629111 (2003-09-01), Stine et al.
patent: 6640290 (2003-10-01), Forin et al.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Memory allocation system and method does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Memory allocation system and method, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Memory allocation system and method will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3263432

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.