Method for improving the performance of dynamic memory allocation by removing small memory fragments from the memory pool
OwnerKeith G. Wallsinventor
Life of this patent
Estimating the term…
Abstract
A method for optimizing dynamic memory pool structures is presented. The size of unusable segments of dynamic memory is determined dynamically and those small segments are safely removed from the dynamic memory pool and placed on a separate list. Periodically or when dynamic memory is in heavy demand, the contents of the separate list are agglomerated and returned to dynamic memory for use. Consequently the time taken to search for a suitably-sized segment of dynamic memory is reduced considerably.
Claims9
A computer executable method to increase performance of allocation and de-allocation of memory in a dynamic memory pool, said computer executable method having at least one list of memory segments available for allocation, said computer executable method also maintaining a separate list consisting of unallocated memory segments that are not to be allocated, the computer executable method comprising the steps of:
- a) automatically determining by periodic observation a small segment size below which memory segments are not likely to be allocated;
- b) periodically removing small memory segments of said small segment size from the dynamic memory pool and placing them on said separate list;
- c) agglomerating the small memory segments listed in said separate list by periodically searching said separate list for physically adjacent memory segments add concatenating said physically adjacent segments to form larger memory segments;
- returning said larger memory segments to said list of memory segments available for allocation if the size of said larger memory segment is greater than said small segment size;
- and
- e) returning memory segments from said separate list by periodically finding small segments on said separate list that are physically adjacent to any unallocated segment in the dynamic memory pool and concatenating said small segments with the adjacent unallocated segment in the dynamic memory pool.
A computer executable method to increase performance of allocation and de-allocation of memory in a dynamic memory pool, said computer executable method having at least one list of memory segments available for allocation, said computer executable method also maintaining a separate list consisting of unallocated memory segments that are not to be allocated, the computer executable method comprising the steps of:
- a) determining a small segment size below which memory segments are not likely to be allocated by setting said small segment size to a look-aside list memory segment size;
- b) periodically removing small memory segments of said small segment size from the dynamic memory pool and placing them on said separate list;
- c) agglomerating the small memory segments listed in said separate list by periodically searching said separate list for physically adjacent memory segments and concatenating said physically adjacent segments to form larger memory segments;
- d) returning said larger memory segments to said list of memory segments available for allocation if the size of said larger memory segment is greater than said small segment size;
- and
- e) returning memory segments from said separate list by periodically finding small segments on said separate list that are physically adjacent to any unallocated segment in the dynamic memory pool, and concatenating said small segments with the adjacent unallocated segment in the dynamic memory pool.
Dependencies are inferred from the claim text.