Abstract:
A method of managing memory, and a system implementing the method, are disclosed herein. In one embodiment according to the invention, the method comprises the step of allocating a first space, a first semi-space and a second semi-space of a memory unit. The first space has a first space size, and the first and second semi-spaces have a semi-space size. The first object is transformed into a plurality of elements and a spine containing pointers to the plurality of elements. The plurality of elements are stored in the first space and the spine in one of the first semi-space and the second semi-space. First memory portions of the first space are reclaimed using a mark-sweep policy and second memory portions of one of the first semi-space and the second semi-space are reclaimed using a moving policy.
Abstract:
Adding references to objects to a mark stack. A limited number of references to objects referenced by an object with a large number of object references are added to the stack. An object is accessed. A determination is made that references in the object should be added to a mark stack using a reference in the mark stack to the object in conjunction with a pointer. The pointer is used to track which references in the object have been placed on the mark stack. A reference to the object on the mark stack is accessed. A pointer is initialized. A reference to another object referenced by the object is pushed onto the mark stack. The pointer is incremented. It is then determined that that more references should be pushed to the mark stack. Acts of pushing references onto the mark stack and incrementing the pointer are repeated.
Abstract:
It is possible to suppress increase of the time required for garbage collection without prolonging the all-sled stop period of AP. A garbage collection system includes: selection means for successively selecting a plurality of sleds in the execution process of the object-orientated program consisting of a plurality of sleds; inspection means for performing inspection processing for stopping the execution of the sled selected, detecting an object accessible from the sled so as to be managed as a non-release object, and resuming execution of the sled; detection means for detecting that an object pointer is made a processing object by the sled in execution after the start of the selection by the selection means and making the object specified by the object pointer a non-release object; and release means for releasing a memory area corresponding to an object other than the object managed as a non-release object after completion of the inspection processing for all the sleds.
Abstract:
A method and system of increasing the speed of a write barrier check. Instead of using zero null references, in one embodiment of the invention a special object is created at a valid and globally accessible location in memory. The special object is colored black, and the valid location of the special object is used in objects, linked lists, and other elements whenever a null value is required. Preferably, the special object is colored black by coloring a bit pattern in a header of the special object to represent black.
Abstract:
A multiprocessor, multi-program, stop-the-world garbage collection program is described. The system initially over partitions the root sources, and then iteratively employs static and dynamic work balancing. Garbage collection threads compete dynamically for the initial partitions. Work stealing double-ended queues, where contention is reduced, are described to provide dynamic load balancing among the threads. Contention is resolved by using atomic instructions. The heap is broken into a young and an old generation where parallel semi-space copying is used to collect the young generation and parallel mark-compacting the old generation. Speed and efficiency of collection is enhanced by use of card tables and linking objects, and overflow conditions are efficiently handled by linking using class pointers. A garbage collection termination employs a global status word.
Abstract:
A system that performs real-time garbage collection by dynamically expanding and contracting the heap is provided. This system performs real-time garbage collection in that the system guarantees garbage collection will not take more time than expected. The system dynamically expands and contracts the heap to correspond to the actual memory space used by live objects. This dynamic resizing of the heap has the advantages of expanding when the amount of objects increases and contracting to free memory space for use by other procedures when the amount of objects decreases. Keeping the heap as small as possible frees resources for other processes and increases the locality of reference for the application. This dynamic resizing also ensures that the new memory space will not run out of memory before all of the live objects from the old memory space are copied, even if all of the live objects in the old memory space survive.
Abstract:
An incremental garbage collector is disclosed. Upon termination of a function or program, the incremental garbage collector scans the object heap for objects allocated by the function or program that are not referenced outside the function or program that allocated the objects. Memory occupied by such objects is immediately reclaimed without having to wait for the garbage collector.
Abstract:
A partially relocated object identifier store including "copy from" and "copy to" identifier storage accessible to write and read barrier logic allows the write and read barrier logic to selectively direct store- and load-oriented accesses to an appropriate FromSpace or ToSpace instance of a partially relocated memory object, in accordance with the memory object's partial relocation state. In some embodiments, the barriers trap to a partially relocated object trap handler. In other embodiments, the write barrier itself directs accesses without software trap handler overheads. Optional "how far" indication storage facilitates differentiation by the barrier logic, or by the partially relocated object trap handler, between a copied portion and an uncopied portion of the partially relocated memory object.
Abstract:
A computing device schedules software garbage collection for software applications during processor idle periods. A future idle period of time during which a processor will be in an idle state during execution of one or more software applications is determined and an allocation of memory is measured for the future idle period of time. One of a plurality of predetermined software garbage collection events is based on the determined future idle period of time and the estimated allocation of memory, and scheduled to be performed during the future idle period of time. The selected software garbage collection event is then performed during the future idle period of time.