# US 2017/0255551 A1 · Multi-Section Garbage Collection

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0255551 A1
- Document ID: US20170255551A1
- Status: Published application
- Kind: A1
- Application number: 15/600,863
- Filed: 2017-05-22
- Published: 2017-09-07
- Earliest claimed: 2015-06-30
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Giles R. Frazier; Michael Karl Gschwind; Younes Manton; Karl M. Taylor; Brian W. Thompto
- Web page: https://patentgrep.com/patent/US20170255551A1

## CPC

- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 2212/1044: Space efficiency improvement
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The embodiments relate to a computer system, computer program product and method for managing a garbage collection process. Processing control is obtained based on execution of a load instruction and a determination that an object pointer to be loaded indicates a location within a selected portion of memory undergoing a garbage collection process. The determination includes identifying a base address and size of a first memory block subject to the garbage collection, subdividing the first memory block into sections, assigning a binary value to each section, and determining if the first memory block corresponds to the enabled section. An image of the load instruction is obtained and a pointer address is calculated from the image. The object pointer is read and it is determined whether the object pointer is to be modified. The object pointer is modified and stored in a selected location.

## Claims

### Claim 1

A computer system for facilitating garbage collection within a computing environment, the computer system comprising:
a memory;
a processor in communication with the memory, wherein the computer system is configured to perform a method, the method comprising:
obtaining processing control based on execution of a load instruction and a determination that an object pointer to be loaded indicates a location within a selected portion of memory undergoing a garbage collection process;
wherein the determination comprises:
identifying a base address and size of a first memory block subject to the garbage collection;
subdividing the first memory block into sections;
assigning a binary value to each section, including assigning a binary value corresponding to an enabled section; and
determining if the first memory block corresponds to the enabled section;
obtaining an image of the load instruction and calculating a pointer address from the image;
reading the object pointer;
determining whether the object pointer is to be modified;
modifying the object pointer to provide a modified object pointer; and
storing the modified object pointer in a selected location.

### Claim 2 (depends on 1)

The computer system of claim 1, wherein the selected portion of memory is part of an object area that includes one or more other objects not undergoing the garbage collection process.

### Claim 3 (depends on 2)

The computer system of claim 2, wherein one or more applications accessing the object area not undergoing the garbage collection process continue to process during the garbage collection process.

### Claim 4 (depends on 3)

The computer system of claim 3, wherein the method further comprises, upon an application accessing the object pointer, using a load monitored doubleword indexed (LDMX) instruction.

### Claim 5 (depends on 4)

The computer system of claim 4, wherein the method further comprises:
examining the LMDX instruction to determine a source register;
reading the source register; and
calculating the pointer address.

### Claim 6 (depends on 1)

The computer system of claim 1, wherein the method further comprises, upon the object pointer not pointing to an object within the selected portion of memory, performing a conventional load.

### Claim 7

A computer program product for facilitating garbage collection within a computing environment, the computer program product comprising:
a computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising:
obtaining processing control based on execution of a load instruction and a determination that an object pointer to be loaded indicates a location within a selected portion of memory undergoing a garbage collection process;
wherein determining the garbage collection process is being executed within the selected portion of memory further comprising:
identifying a base address and size of a first memory block subject to the garbage collection;
subdividing the first memory block into sections;
assigning a binary value to each section, including assigning a binary value corresponding to an enabled section; and
determining if the first memory block corresponds to the enabled section;
obtaining an image of the load instruction and calculating a pointer address from the image;
reading the object pointer;
determining whether the object pointer is to be modified;
modifying the object pointer to provide a modified object pointer; and
storing the modified object pointer in a selected location.

### Claim 8 (depends on 7)

The computer program product of claim 7, wherein the selected portion of memory is part of an object area that includes one or more other objects not undergoing the garbage collection process.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein one or more applications accessing the object area not undergoing the garbage collection process continue to process during the garbage collection process.

### Claim 10 (depends on 9)

The computer program product of claim 9, wherein the method further comprises, upon an application accessing the object pointer, using a load monitored doubleword indexed (LDMX) instruction.

### Claim 11 (depends on 10)

The computer program product of claim 10, wherein the method further comprises:
examining the LMDX instruction to determine a source register;
reading the source register; and
calculating the pointer address.

### Claim 12 (depends on 7)

The computer program product of claim 7, wherein the method further comprises, upon the object pointer not pointing to an object within the selected portion of memory, performing a conventional load.

### Claim 13 (depends on 7)

The computer program product of claim 7, wherein the base address and size of the first memory block are stored in a register.

### Claim 14

A method comprising:
obtaining processing control based on execution of a load instruction and a determination that an object pointer to be loaded indicates a location within a selected portion of memory undergoing a garbage collection process;
wherein the determination comprises:
identifying a base address and size of a first memory block subject to the garbage collection;
subdividing the first memory block into sections;
assigning a binary value to each section, including assigning a binary value corresponding to an enabled section; and
determining if the first memory block corresponds to the enabled section;
obtaining an image of the load instruction and calculating a pointer address from the image;
reading the object pointer;
determining whether the object pointer is to be modified;
modifying the object pointer to provide a modified object pointer; and
storing the modified object pointer in a selected location.

### Claim 15 (depends on 14)

The method of claim 14, wherein the selected portion of memory is part of an object area that includes one or more other objects not undergoing the garbage collection process.

### Claim 16 (depends on 15)

The method of claim 15, wherein one or more applications accessing the object area not undergoing the garbage collection process continue to process during the garbage collection process.

### Claim 17 (depends on 16)

The method of claim 16, further comprising upon an application accessing the object pointer, using a load monitored doubleword indexed (LDMX) instruction.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
examining the LMDX instruction to determine a source register;
reading the source register; and
calculating the pointer address.

### Claim 19 (depends on 14)

The method of claim 14, further comprising, upon the object pointer not pointing to an object within the selected portion of memory, performing a conventional load.

### Claim 20 (depends on 14)

The method of claim 14, wherein the base address and size of the first memory block are stored in a register.
