Timely finalization of system resources
First Claim
1. A method for deallocating memory, comprising:
- upon determining that an object associated with a high-priority finalizer capable of executing at a system level is eligible to have said object'"'"'s memory freed, executing the high-priority finalizer;
deallocating, upon completion of said executing of said high-priority finalizer, said object'"'"'s memory;
performing within one garbage collection cycle said deallocating and said executing to minimize latency;
executing, at indeterminate times, non-high-priority finalizers associated with objects eligible for deallocation, said objects becoming unreachable; and
freeing, at an indeterminate time relative to when an object'"'"'s non-high-priority finalizer is executed, memory associated with said object.
6 Assignments
0 Petitions
Accused Products
Abstract
A garbage collector, from time to time, and within a single cycle, determines objects that are eligible to have their associated memory freed; executes high-priority finalizers associated with such eligible objects as are determined; and after execution of a high-priority finalizer, deallocates the memory of the associated object. The garbage collector queues references to eligible objects that have non-high-priority finalizers in a list. After garbage collection is completed, a finalizer thread runs the queued non-high-priority finalizers and marks the associated objects as ready for deallocation. The garbage collector, during a subsequent cycle, then deallocates the memory associated with marked objects.
65 Citations
9 Claims
-
1. A method for deallocating memory, comprising:
-
upon determining that an object associated with a high-priority finalizer capable of executing at a system level is eligible to have said object'"'"'s memory freed, executing the high-priority finalizer; deallocating, upon completion of said executing of said high-priority finalizer, said object'"'"'s memory; performing within one garbage collection cycle said deallocating and said executing to minimize latency; executing, at indeterminate times, non-high-priority finalizers associated with objects eligible for deallocation, said objects becoming unreachable; and freeing, at an indeterminate time relative to when an object'"'"'s non-high-priority finalizer is executed, memory associated with said object. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A system for deallocating memory, comprising:
-
means for executing a high-priority finalizer capable of executing at a system level upon a determination that an object associated with said high-priority finalizer is eligible to have said object'"'"'s memory freed; means for deallocating said object'"'"'s memory upon completion of said means for executing said high-priority finalizer, wherein said means for reallocating and said means for executing perform the high-priority finalizer and reallocating in one garbage collection cycle to minimize latency; means for executing, at indeterminate times, non-high-priority finalizers associated with objects eligible for deallocation, said objects becoming unreachable; and means for freeing, at an indeterminate time relative to when an object'"'"'s non-high-priority finalizer is executed, memory associated with said object.
-
Specification