Browse Prior Art Database

Method to use register allocation to reduce the size of data required for garbage collection

IP.com Disclosure Number: IPCOM000006431D
Publication Date: 2002-Jan-02
Document File: 2 page(s) / 1K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a method to use register allocation to reduce the size of data required for garbage collection support. Benefits include a reduction in Java Virtual Machine (JVM) memory requirements.

This text was extracted from a Microsoft Word document.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 50% of the total text.

Method to use register allocation to reduce the size of data required for garbage collection

Disclosed is a method to use register allocation to reduce the size of data required for garbage collection support. Benefits include a reduction in Java Virtual Machine (JVM) memory requirements.

              The disclosed method is a register allocation technique that allows reduction of the size of data required for garbage collection support.

              An efficient implementation of JVM requires a just-in-time compiler that translates Java byte codes into native instructions, as well as provides support for garbage collection. When garbage collector executes (for example, when memory heap is exhausted) compiler must report to the garbage collector registers and stack locations that contain references to the live objects. In a single-threaded application, garbage collection happens only at call sites. In multi-threaded applications, a thread that did not trigger the garbage collection might be stopped at an arbitrary point. Providing garbage collection support at every instruction allows JVM to perform garbage collection as soon as it was requested.

              During compilation, the compiler computes and records a table called the GC map. It is a mapping between instructions and sets of registers and stack locations that contain live references. After a method has been compiled, its GC map is stored in memory together with the generated native code. The size of the GC map has a direct effect on the total memory requirements of JVM and should be reduced as much as possible.

              IA-64 architecture provides 128 general registers that can be used to store both integer and reference variables. Traditional goal of register allocation is to assign registers to variables in such a way as to minimize the number of times data are moved between registers and memory. As integer and reference variables can be stored in the same registers, they are traditionally treated by register allocation in the same way.  As a result, a program might use up to 128 registers to store live references. To reduce the size of the GC map, limit the number of registers that might contain live references. As fewer registers contain references, fewer bits are required to encode register numbers in the GC map, and the GC map size is reduced in size.

              The disclosed method is a register allocation technique that enables a compiler to control the number of registers occupied by references without sacrificing total quality of register allocation. A two-pass approach is implem...