← Back to Patent Explorer
US6473773B1 Expired / Lapsed US ⏱️ 0.0 years remaining

Memory management in a partially garbage-collected programming system

Assignee: International Business Machines Corp
•
Filing: 1998-06-06
•
Granted: 2002-10-29
•
Expires: 2018-06-06
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract Memory management to support calls between objects in language environments support automatic garbage collection and language environments requiring explicit control of object destruction is provided. Reference counting is used to automatically control the lifetime of objects requiring explicit destruction and that are to be accessible across the language boundary. A data structure is maintained in a runtime component for each object that is accessed over a language boundary. The reference count for each non-garbage collected object is incremented by the runtime in accordance with the number of cross-language references held to it. When the count reaches zero through decrements as the references are returned and destroyed, the non-garbage collected object can be safely and automatically destroyed. The runtime creates a strong reference to any garbage collected object accessed by a cross-language call. The reference is visible to the garbage collector, and prevents the object being collected while the reference is in existence.

Inventors

  • 👤 Michael Cheng
  • 👤 Tim Scott Hanson
  • 👤 Kim Lawson Rochat
  • 👤 Simon Christopher Nash
  • 👤 Brian Ward Thomson

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-31 11:39
CPC Classifications
G; G06; G06F; G06F12/00; G06F12/02; G06F12/0223; G06F12/023; G06F12/0253; G06F12/0261; G06F9/00; G06F9/06; G06F9/44; G06F9/448; G06F9/4488; Y; Y10; Y10S; Y10S707/00; Y10S707/953; Y10S707/955; Y10S707/99941; Y10S707/99944

Claims Analysis

Total Claims: 19
Claim 1
Independent Claim 114 words
A cross-language memory management system for use in an object oriented programming environment, comprising: an explicit memory management domain in which reference counting is used to reclaim memory blocks; an implicit memory management domain in which garbage collection is used to reclaim memory blocks; and interface mechanism connecting the explicit memory management domain and the implicit memory management domain for detecting cross-language references between the explicit and implicit memory management domains intended for implementation objects in said domains and, in the case of any implementation object in the implicit memory management domain targeted by an existing cross-language reference from the explicit memory management domain, maintaining at least one strong reference to that implementation object.
Claim 2
Dependent Claim 58 words
The cross-language memory management system, according to claim 1 wherein for any implementation object targeted by at least one cross-language reference, the interface mechanism comprises a reference object containing a reference count of cross-language references intended for that implementation object and, while the reference count is non-zero, the reference object maintaining a strong reference to its implementation object.
Claim 3
Dependent Claim 59 words
The cross-language reference according to claim 2 wherein the interface mechanism is in an explicit memory management domain adapted to: create a new reference object with its reference count set initially at one on detecting a cross-language reference intended for an implementation object referenced by no previously-existing reference object; and destroy a reference object when its count reaches zero.
Claim 4
Dependent Claim 46 words
The cross-language memory management system, according to claim 2 , further comprising means for creating and maintaining in each domain, proxy objects for cross-language references invoked by client objects in that domain, a proxy object being adapted to connect a client object to a reference object.
Claim 5
Dependent Claim 98 words
In an object oriented programming environment permitting cross-language invocations from an explicit memory management domain in which reference counting is used to destroy objects and reclaim memory blocks to an implicit memory management domain in which garbage collection is used to destroy objects and reclaim memory blocks, a mechanism to control object destruction, comprising: means for passing a strong reference from a calling object in the explicit memory management domain to an implementation object called by the calling object in the implicit memory management domain; and means for destroying the strong reference upon destruction of the calling object.
Claim 6
Dependent Claim 42 words
The mechanism, according to claim 5 , further comprising a proxy object invoked by the calling object, and wherein the means to pass the strong reference comprises means to pass a pointer in the implicit memory management domain to the implementation object.
Claim 7
Dependent Claim 55 words
The mechanism, according to claim 6 , wherein: the proxy object is in the explicit memory management domain and includes a reference counter adapted to count invocations on the proxy object; and wherein the means to destroy the strong reference comprise explicit memory management routines when the reference counter in the proxy object is zero.
Claim 8
Dependent Claim 104 words
In an object oriented programming environment permitting cross-language invocations from an implicit memory management domain in which garbage collection is used to destroy objects and reclaim memory blocks to an explicit memory management domain in which reference counting is used to destroy objects and reclaim memory blocks, a mechanism to control object destruction, comprising: means for incrementing a reference count in an implementation object in the explicit memory management domain invoked by a calling object in the implicit memory management domain; means for returning a weak reference to the calling object; and means for decrementing the reference count upon destruction of the calling object.
Claim 9
Dependent Claim 42 words
The mechanism, according to claim 8 , further comprising a proxy object invoked by the calling object, and wherein the means to increment the reference count comprises means to pass a pointer in the explicit memory management domain to the implementation object.
Claim 10
Dependent Claim 32 words
The mechanism, according to claim 9 , wherein the proxy object is in the implicit memory management domain and the means to decrement the reference count include destruction of the proxy object.
Claim 11
Independent Claim 88 words
A method for implementing a cross-language call from a client between an implicit memory management domain in which garbage collection is used to reclaim memory blocks and an explicit memory management domain in which reference counting is used to reclaim memory blocks, comprising: invoking a method for the call on a proxy object permitting cross-language access; converting the method to a language-independent token having a reference count of at least one; selecting a pointer for invoking an implementation side mechanism; and receiving a return value at the client.
Claim 12
Dependent Claim 58 words
A method, according to claim 11 , wherein the step of receiving a return value comprises: receiving as a return value a reference to a cross-language object; incrementing a reference count in a language-independent token for the cross-language object; converting the return value to the language-independent token; and locating a proxy for the reference to the cross-language object.
Claim 13
Dependent Claim 53 words
A method, according to claim 12 , wherein the step of locating a proxy for the cross-language object comprises: locating an existing proxy for the cross-language object and decrementing the reference count in the language-independent token for the cross-language object; or, if no proxy currently exists for the cross-language object, creating a proxy.
Claim 14
Dependent Claim 59 words
A method, according to claim 12 further comprising implementing memory management when the client releases the proxy object permitting cross-language access, including the steps of: decrementing the reference count in the language-independent token when the proxy object is destroyed; and destroying the language-independent token when its reference count reaches zero, thereby destroying the pointer to the implementation side mechanism.
Claim 15
Dependent Claim 129 words
A computer program product for implementing a call from an client between a programming environment in which garbage collection is used to reclaim memory blocks and an implementation in a programming environment in which garbage collection is not used to reclaim memory blocks, said computer program product comprising: a computer readable storage medium having computer readable code means embodied in said medium, said computer readable code means comprising: computer instruction means for invoking a method for the call on a proxy object permitting cross-language access; computer instruction means for converting the method to a language-independent token having a reference count of at least one; computer instruction means for selecting a pointer for invoking an implementation side mechanism; and computer instruction means for receiving a return value at the client.
Claim 16
Dependent Claim 161 words
A composite object constructed over at least first and second object oriented language environments, one of said environments having explicit memory management using reference counting to reclaim memory blocks and the other one of said environments having implicit memory management using garbage collection to reclaim memory blocks, comprising: a first class hierarchy for the composite object constructed in the first environment having a proxy base class and at least one derived implementation object; a second class hierarchy for the composite object constructed in the second environment having a base implementation class and at least one proxy derived class; and an interface mechanism for detecting a cross-language reference from a proxy class in the composite object and to select a pointer to a corresponding implementation class; wherein when a method invoked on the composite object in one of the language environments executes on a proxy class, that proxy class invokes a cross-language method on its corresponding implementation class in the second environment.
Claim 17
Dependent Claim 71 words
The composite object constructed according to claim 16 wherein at least one proxy derived class contains a reference to a weak reference object in the interface mechanism, and the second class hierarchy includes a cloned proxy derived class containing a reference to a strong reference object in the interface mechanism, said cloned proxy derived class being constructed when a client in the second environment acquires a reference to the composite object.
Claim 18
Dependent Claim 35 words
The composite object constructed according to claim 16 where, in the case of a derived proxy class invoking a cross-language method, means for maintaining the pointer selected by the interface mechanism as a weak reference.
Claim 19
Dependent Claim 44 words
The composite object constructed according to claim 18 wherein, when the first environment is explicitly memory managed and said at least one derived implementation class contains a reference count, means to change the pointer to a weak reference when the reference count reaches one.

References Cited (Backward Citations)

US6029175A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2005-10-28 2006-04-29 2006-10-29 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2009-10-28 2010-04-29 2010-10-29 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2013-10-28 2014-04-29 2014-10-29 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag