# US 2004/0024798 A1 · Conditional garbage based on monitoring to improve real time performance

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

- Number: US 2004/0024798 A1
- Document ID: US20040024798A1
- Status: Published application
- Kind: A1
- Application number: 10/631,195
- Filed: 2003-07-31
- Published: 2004-02-05
- Earliest claimed: 2002-07-31
- Assignees: Texas Instruments Incorporated
- Inventors: Gerard Chauvel
- Web page: https://patentgrep.com/patent/US20040024798A1

## CPC

- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 9/30134: {Register stacks; shift registers}
- G06F 9/30174: {for non-native instruction set, e.g. Javabyte, legacy code}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 2212/502: using adaptive policy
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- Y10S 707/99957: Garbage collection
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y10S: TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS

## Abstract

A system comprising a counter adapted to monitor the memory consumption of the allocated memory resources. Upon reaching or surpassing the memory resource threshold provided, the counter may indicate the need for garbage collection. The garbage collector assesses the memory and releases memory resources that are consumed by the programs but are not needed anymore. The recycled memory resources are thus provided to the programs and the counter is updated accordingly. In addition, the system may also include instructions requesting memory resources. After detecting such instructions, the memory usage counter is updated either by the exact amount of memory allocated or the. estimated amount of memory allocated. The counter may be implemented in hardware or in software.

## Claims

### Claim 1

A system, comprising:
memory device;
counter coupled to the memory device, wherein the counter is adapted to monitor memory consumption of the memory device for one or more programs;
a plurality of processors coupled to the counter, wherein one of the plurality of processors within the system is coupled to a garbage collector adapted to free a portion of unused memory; and
wherein executing the garbage collector is triggered based on a value of the counter.

### Claim 2 (depends on 1)

The system of claim 1, wherein the value is a programmable threshold value, and wherein when the counter reaches the programmable value, the garbage collector is triggered.

### Claim 3 (depends on 2)

The system of claim 2, wherein upon reaching the programmable threshold value, the counter sends an interrupt value to the processor, which executes the garbage collector.

### Claim 4 (depends on 2)

The system of claim 2, wherein a software process is regularly polling the counter to check if the predetermined threshold value has been reached, and wherein upon reaching the predetermined threshold value, the garbage collector is triggered.

### Claim 5 (depends on 1)

The system of claim 1, wherein the system further comprises a decoder coupled to the counter, wherein upon decoding an instruction requesting memory allocation, the counter is updated with an estimated memory usage value for the instruction.

### Claim 6 (depends on 1)

The system of claim 1, wherein the system further comprises a micro-sequence replacing an instruction requesting memory allocation, wherein upon executing an instruction from the micro-sequence requesting memory allocation, the counter is updated with an exact memory usage value for the instruction.

### Claim 7 (depends on 6)

The system of claim 6, wherein the counter is updated by a value stored within the memory device.

### Claim 8 (depends on 1)

The system of claim 1, wherein a software process is triggered by an instruction that requests memory allocation, and wherein prior to performing or requesting another memory allocation task, the software process increments a counter indicative of the memory consumed.

### Claim 9

A method, comprising:
monitoring memory consumption of a memory device for one or more programs;
triggering a garbage collector to free a portion of the memory upon surpassing a threshold value; and
updating a memory usage counter after retrieving a portion of the memory.

### Claim 10 (depends on 10)

The method of claim 10, wherein the method further comprises decoding an instruction requesting memory allocation.

### Claim 11 (depends on 11)

The method of claim 11, wherein the instruction is a standard Java instruction, and wherein the counter is updated with an estimated memory usage value for the instruction.

### Claim 12 (depends on 11)

The method of claim 11, wherein the instruction belongs to a micro-sequence, and wherein the counter is update with an exact memory usage value for the instruction.

### Claim 13 (depends on 10)

The method of claim 10, wherein the step of triggering the garbage collector further comprises periodic monitoring of the memory usage counter.

### Claim 14 (depends on 10)

The method of claim 10, where the step of triggering the garbage collector comprises receiving a request from memory usage counter when the step of monitoring the memory consumption reaches a programmable threshold value.

### Claim 15

A system, comprising:
processor coupled to a garbage collector adapted to free unused memory resources for one or more programs;
counter coupled to the processor, wherein the counter is adapted to monitor memory consumption for the one or more programs; and
wherein upon surpassing a threshold value, the counter triggers the garbage collector.

### Claim 16 (depends on 15)

The system of claim 15, wherein the system further comprises a decoder coupled to the counter, and wherein the decoder provides information to update the counter.

### Claim 17 (depends on 16)

The system of claim 16, wherein the decoder decodes a standard Java instruction requesting memory allocation.

### Claim 18 (depends on 17)

The system of claim 17, wherein the counter is updated with an approximate memory usage value.

### Claim 19 (depends on 16)

The system of claim 16, wherein the decoder decodes an instruction from a micro-sequence requesting memory allocation.

### Claim 20 (depends on 19)

The system of claim 19 and wherein the counter is updated with an exact memory usage value.

### Claim 21 (depends on 15)

The system of claim 15, wherein the counter is monitored periodically by a software process, and upon reaching the threshold value, the software process triggers the garbage collector.

### Claim 22 (depends on 15)

The system of claim 15, wherein the processor is a main processor.

### Claim 23 (depends on 22)

The system of claim 22, wherein the system further comprises a co-processor coupled to the main processor, wherein the co-processor is adapted to provide an interrupt signal to the main processor when the counter surpasses the threshold value.

### Claim 24 (depends on 23)

The system of claim 23, wherein the main processor initiates the garbage collector upon receipt of the interrupt signal.

### Claim 25 (depends on 15)

The system of claim 15, wherein the system is a cellular telephone.
