Thread-based memory management with garbage collection
AssigneeSap SE
InventorMartin Moser
Life of this patent
Estimating the term…
Abstract
Systems and methods for thread-based memory management may include activating a processing thread. The memory may include a first region and a second region with the first region having several segments. A segment of memory may be allocated for the processing thread. Data associated with an object may be stored in the segment. At the end of processing by the processing thread, a garbage collection process may be performed by the processing thread on the segment allocated to the processing thread.
Claims20
A computer-implemented method for managing the allocation of memory comprising:
- activating a processing thread;
- allocating memory for the processing thread, wherein the allocated memory includes a first region having a plurality of segments;
- determining if data associated with an object utilized by the processing thread is to be stored in the first region of the allocated memory;
- determining if the data associated with the object can be stored in a first segment of the plurality of segments;
- storing the data associated with the object in the first segment in response to the determination that the data associated with the object can be stored in the first segment;
- and
- the processing thread including code performing a garbage collection process on the allocated first segment prior to termination of the processing thread.
A system comprising:
- a memory having a first region that includes a plurality of segments;
- and
- a storage device storing instructions that, when executed by a processing module of the system, cause the processing module to perform operations comprising:
- activating a processing thread;
- allocating a first segment of the plurality of segments for the processing thread,
- determining if data associated with an object is to be stored in the memory,
- determining if the data associated with the object can be stored in the allocated first segment,
- determining if the plurality of segments has an allocatable second segment in response to the determination that the data associated with the object cannot be stored in the allocated first segment,
- if the data associated with the object cannot be stored in the allocated first segment and the first region has an allocatable second segment:
- allocating the second segment of the plurality of segments for the processing thread, and
- storing the data associated with the object at the allocated portion of the second segment, and
- the processing thread including code performing a garbage collection process on the first segment and the second segment prior to termination of the processing thread.
A non-transitory computer-readable storage device storing instructions that, when executed by a processing module, cause the processing module to perform operations comprising:
- activating a processing thread;
- allocating a memory for the processing thread, wherein the allocated memory includes a first region having a plurality of segments to store data for objects to be created during the processing performed by the processing thread;
- storing data associated with an object in a first segment of the plurality of segments;
- the processing thread including code performing a garbage collection process on the plurality of segments prior to termination of the processing thread;
- and
- releasing the plurality of segments.
Dependencies are inferred from the claim text.