# US 2022/0291962 A1 · Stack memory allocation control based on monitored activities

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

- Number: US 2022/0291962 A1
- Document ID: US20220291962A1
- Status: Published application
- Kind: A1
- Application number: 17/197,746
- Filed: 2021-03-10
- Published: 2022-09-15
- Earliest claimed: 2021-03-10
- Assignees: Texas Instruments Incorporated
- Applicants: Texas Instruments Incorporated
- Inventors: Barak CHERCHES; Shaul BARNER; Yaron ALPERT
- Web page: https://patentgrep.com/patent/US20220291962A1

## CPC

- G06F 9/5016: {the resource being the memory}
- G06F 9/3004: {to perform operations on memory}
- G06F 9/3009: {Thread control instructions}
- G06F 9/342: {Extension of operand address space}
- G06F 11/073: {in a memory management context, e.g. virtual memory or cache management (memory management G06F12/00; testing of static memory units G11C29/00)}
- G06F 11/0772: {Means for error signaling, e.g. using interrupts, exception flags, dedicated error registers}
- G06F 11/3024: {where the computing system component is a central processing unit [CPU]}
- G06F 11/3037: {where the computing system component is a memory, e.g. virtual memory, cache (accessing, addressing or allocating within memory systems or architectures G06F12/00; checking stores for correct operation G11C29/00)}
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- 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

## Abstract

An integrated circuit includes: a processor; a memory coupled to the processor; and a stack memory allocation controller coupled to the processor and the memory. The stack memory allocation controller has: a stack use manager configured to monitor activities of the processor. The stack memory allocation controller also has a virtual memory translator configured to: obtain a first mapping of pointers to a first sub-set of memory blocks of the memory assigned to a memory stack for a thread executed by the processor; and determine a second mapping of pointers to a second sub-set of memory blocks of the memory assigned to the memory stack and different than the first sub-set of memory blocks responsive to the monitored activities.

## Claims

### Claim 1

An integrated circuit, comprising:
a processor;
a memory coupled to the processor; and
a stack memory allocation controller coupled to the processor and the memory, the stack memory allocation controller having:
a stack use manager configured to monitor activities of the processor; and
a virtual memory translator configured to:
obtain a first mapping of pointers to a first sub-set of memory blocks of the memory assigned to a memory stack for a thread executed by the processor; and
determine a second mapping of pointers to a second sub-set of memory blocks of the memory assigned to the memory stack and different than the first sub-set of the memory blocks responsive to the monitored activities.

### Claim 2 (depends on 1)

The integrated circuit of claim 1, wherein the virtual memory translator is configured to determine the second mapping of pointers responsive to the monitored activities and a stack utilization target provided by the stack use manager.

### Claim 3 (depends on 2)

The integrated circuit of claim 2, wherein the stack utilization target defines some of the memory blocks of the memory as shareable memory blocks for different threads executed by the processor.

### Claim 4 (depends on 1)

The integrated circuit of claim 1, wherein the stack memory allocation controller is configured to:
monitor activities related to threads being executed in parallel by the processor; and
provide an updated mapping to different sub-sets of memory blocks of the memory responsive to the monitored activities.

### Claim 5 (depends on 1)

The integrated circuit of claim 1, wherein the stack memory allocation controller is configured generate a fault responsive to a stack overflow.

### Claim 6 (depends on 3)

The integrated circuit of claim 3, wherein the stack memory allocation controller is configured to clear memory blocks of the memory that are not in use.

### Claim 7 (depends on 2)

The integrated circuit of claim 2, wherein the stack utilization target limits the memory blocks of the memory assigned to the thread responsive to a current need determined from the monitored activities.

### Claim 8 (depends on 1)

The integrated circuit of claim 1, wherein the monitored activities includes stack pointer information.

### Claim 9 (depends on 1)

The integrated circuit of claim 1, wherein the monitored activities includes operating system (OS) context switches.

### Claim 10 (depends on 1)

The integrated circuit of claim 1, further comprising a memory block power interface coupled to the stack memory allocation controller and the memory, wherein the second sub-set of memory blocks includes more memory blocks of the memory than the first-sub-set of memory blocks, the stack memory allocation controller is configured to provide a control signal to the memory block power interface, and the memory block power interface is configured to change a power state of at least one memory block of the memory from off to on responsive to the control signal.

### Claim 11 (depends on 1)

The integrated circuit of claim 1, further comprising a memory block power interface coupled to the stack memory allocation controller and the memory, wherein the second sub-set of memory blocks includes less of memory blocks of the memory than the first sub-set of memory blocks, the stack memory allocation controller is configured to provide a control signal to the memory block power interface, and the memory block power interface is configured to change a power stage of at least one of memory block of the memory from on to off responsive to the control signal.

### Claim 12

A stack memory allocation controller, comprising:
a first interface adapted to be coupled to processor;
a stack use manager coupled to the first interface and configured to monitor activities of the processor; and
a virtual memory translator coupled to the stack use manager and configured to:
obtain a first mapping of pointers to a first sub-set of memory blocks of a memory assigned to a memory stack for a thread executed by the processor; and
determine a second mapping of pointers to a second sub-set of memory blocks of the memory assigned to the memory stack and different than the first sub-set of memory blocks responsive to the monitored activities.

### Claim 13 (depends on 12)

The stack memory allocation controller of claim 12, further comprising a second interface adapted to be coupled to a memory block power interface, wherein the stack use manager is configured to provide a control signal to the memory block power interface responsive to the second mapping of pointers, and the control signal results in a power state of at least one memory block of the memory being changed.

### Claim 14 (depends on 12)

The stack memory allocation controller of claim 12, wherein the virtual memory translator is configured to determine the second mapping of pointers responsive to: monitored activities that include stack pointer information; and a stack utilization target provided by the stack use manager.

### Claim 15 (depends on 12)

The stack memory allocation controller of claim 12, wherein the virtual memory translator is configured to determine the second mapping of pointers responsive to: monitored activities that include operating system (OS) context switches; and a stack utilization target provided by the stack use manager.

### Claim 16 (depends on 13)

The stack memory allocation controller of claim 13, wherein the stack utilization target defines some memory blocks of the memory as shareable memory blocks for different threads executed by the processor.

### Claim 17 (depends on 13)

The stack memory allocation controller of claim 13, wherein the stack utilization target limits memory blocks of the memory assigned to the thread responsive to a current need determined from the monitored activities.

### Claim 18 (depends on 12)

The stack memory allocation controller of claim 12, wherein the stack memory allocation controller is configured to:
generate a fault responsive to a stack overflow; and
clear memory blocks of the memory that are not in use.

### Claim 19

A method, comprising:
initiating, by a processor, a thread;
monitoring activities of the processor; and
managing virtual memory space to allocate or release physical memory blocks of a memory to the stack responsive to the monitored activities.

### Claim 20 (depends on 19)

The method of claim 19, wherein managing virtual memory space is responsive to the monitored activities and a stack utilization target that defines some of the physical memory blocks as shareable memory blocks for different threads executed by the processor.

### Claim 21 (depends on 19)

The method of claim 19, further comprising:
generating a fault responsive to a stack overflow; and
clear memory blocks of the memory that are not in use.

### Claim 22 (depends on 18)

The method of claim 18, wherein the stack utilization target limits the physical memory blocks assigned to the thread responsive to a current need determined from the monitored activities.
