Non-zero null reference to speed up write barrier checking for garbage collection
AssigneeEsmertec AG
InventorStephen Thomas
Life of this patent
Estimating the term…
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.
Claims15
A method of increasing the speed of a write barrier check in a computing environment having memory and a plurality of programming objects, the method comprising:
- creating a globally accessible special object at a valid location in the memory;
- fixing the colour of the special object to a predetermined colour;
- and
- using the valid location of the special object whenever a null value is required.
A write barrier checking apparatus for a computing environment having memory and a plurality of programming objects, the apparatus comprising:
- a globally accessible special object having a fixed predetermined colour and a valid location in the memory;
- and
- a write tool to check the colour of the plurality of objects;
- wherein the valid location of the special object is used whenever a null value is required, and the write tool assigns references to the programming objects that are not the predetermined colour.
An apparatus as claimed in 10, further comprising a linked list with a plurality of fields, wherein at least one of the fields of the linked list includes the valid location of the special object.
Dependencies are inferred from the claim text.