Memory management in a partially garbage-collected programming system
This invention relates generally to the field of mixed programming environments, and provides, in particular, mechanisms for combining memory management disciplines and for managing object instances in a mixed programming environment. Memory management to support calls between objects in language en...
Gespeichert in:
Hauptverfasser: | , , , , |
---|---|
Format: | Patent |
Sprache: | eng |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | This invention relates generally to the field of mixed programming environments, and provides, in particular, mechanisms for combining memory management disciplines and for managing object instances in a mixed programming environment.
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. |
---|