# US 10,481,817 B2 · Methods and apparatus to optimize dynamic memory assignments in multi-tiered memory systems

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

- Number: US 10,481,817 B2
- Document ID: US10481817B2
- Status: Granted
- Kind: B2
- Application number: 16/022,339
- Filed: 2018-06-28
- Published: 2019-02-07
- Granted: 2019-11-19
- Earliest claimed: 2018-06-28
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Kshitij Doshi; Andreas Kleen; Harshad Sane
- Web page: https://patentgrep.com/patent/US10481817B2

## CPC

- G06F 3/0631: {by allocating resources to storage systems}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0653: {Monitoring storage devices or systems}
- G06F 3/0656: {Data buffering arrangements}
- G06F 3/0683: {Plurality of storage devices}
- G06F 9/5016: {the resource being the memory}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods, apparatus, systems and articles of manufacture to optimize dynamic memory assignments in multi-tiered memory systems are disclosed. An example computer readable storage medium comprises instructions to, during an offline profiling run of a computer application: responsive to a first malloc function call, perform a first backtrace to identify a first path preceding the first malloc function call and identify a size of a buffer in memory allocated to the first path; and determine an indicator corresponding to a temperature of the buffer allocated to the first path; and during runtime: responsive to a second malloc function call, perform a second backtrace to identify a second path preceding the second malloc function call; and responsive to the second path corresponding to the first path, allocate memory from a tier of memory based on the indicator.

## Claims

### Claim 1

A non-transitory computer readable storage medium comprising executable computer program instructions which, when executed, cause a machine to at least:
during an offline profiling run of a computer application:
responsive to a first malloc function call, perform a first backtrace to identify a first path preceding the first malloc function call and identify a size of a buffer in memory allocated to the first path; and
determine an indicator corresponding to a temperature of the buffer allocated to the first path; and
during runtime:
responsive to a second malloc function call, perform a second backtrace to identify a second path preceding the second malloc function call; and
responsive to the second path corresponding to the first path, allocate memory from a tier of memory based on the indicator.

### Claim 2 (depends on 1)

The computer readable storage medium of claim 1, wherein:
responsive to the indicator corresponding to a first temperature, the tier of memory is a first tier corresponding to at least one of a first latency and a first bandwidth; and
responsive to the indicator corresponding to a second temperature lower than the first temperature, the tier of memory is a second tier corresponding to at least one of a second latency higher than the first latency and a second bandwidth lower than the first bandwidth.

### Claim 3 (depends on 2)

The computer readable storage medium of claim 2, wherein the instructions cause the machine to, responsive to the indicator corresponding to the second temperature and the first tier has capacity to allocate memory, allocate memory from the first tier of memory.

### Claim 4 (depends on 1)

The computer readable storage medium of claim 1, wherein the instructions cause the machine to:
store a correspondence between the first path and the temperature in a database during the offline profiling run; and
determine that the second path corresponds to the first path by comparing the second path with the first path.

### Claim 5 (depends on 1)

The computer readable storage medium of claim 1, wherein the instructions cause the machine to, during the offline profiling mode:
assign a buffer tag to the buffer;
compute a path temperature for the first path relative to other paths corresponding to other malloc function calls determined during the offline profiling run based on the buffer tag;
determine a set of markers corresponding to the other paths;
trace the set of markers to that belong on the first path;
assign a path signature to the first path based on the traced set of markers; and
store the path signature with the path temperature in a database.

### Claim 6 (depends on 1)

The computer readable storage medium of claim 1, wherein the instructions cause the machine to, during the offline profiling run, filter out at least one of malloced paths that correspond to a low temperature or malloced paths that correspond to high capacity allocations.

### Claim 7 (depends on 1)

The computer readable storage medium of claim 1, wherein the instructions cause the machine to, responsive to the tier of memory being unavailable, rebalance the memory across tiers of the memory.

### Claim 8 (depends on 1)

The computer readable storage medium of claim 1, wherein the indicator corresponding to the temperature corresponds to a frequency that the buffer allocated to the first path will be accessed by the computer application.

### Claim 9

An apparatus to perform dynamic memory assignments in multi-tiered memory systems, the apparatus comprising:
a malloc information processor to, during an offline profiling run of a computer application, perform a first backtrace responsive to a first malloc function call to identify a first path preceding the first malloc function call and identify a size of a buffer in memory allocated to the first path;
a temperature determiner to determine an indicator corresponding to a temperature of the buffer allocated to the first path;
a path determiner to, during runtime, perform a second backtrace responsive to a second malloc function call to identify a second path preceding the second malloc function call; and
a memory tier allocator to, responsive to the second path corresponding to the first path, allocate memory from a tier of memory based on the indicator.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein:
responsive to the indicator corresponding to a first temperature, the tier of memory is a first tier corresponding to at least one of a first latency and a first bandwidth; and
responsive to the indicator corresponding to a second temperature lower than the first temperature, the tier of memory is a second tier corresponding to at least one of a second latency higher than the first latency and a second bandwidth lower than the first bandwidth.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein the memory tier allocator is to, responsive to the indicator corresponding to the second temperature and the first tier has capacity to allocate memory, allocate memory from the first tier of memory.

### Claim 12 (depends on 9)

The apparatus of claim 9, further including a database to store a correspondence between the first path and the temperature during the offline profiling run, the memory tier allocator to determine that the second path corresponds to the first path by comparing the second path with the first path.

### Claim 13 (depends on 9)

The apparatus of claim 9, further including:
a path processor to, during the offline profiling mode, assign a buffer tag to the buffer;
the temperature determiner to compute a path temperature for the first path relative to other paths corresponding to other malloc function calls determined during the offline profiling run based on the buffer tag;
the path processor to:
determine a set of markers corresponding to the other paths;
trace the set of markers to that belong on the first path; and
assign a path signature to the first path based on the traced set of markers; and
a database to store the path signature with the path temperature.

### Claim 14 (depends on 9)

The apparatus of claim 9, further including a path processor to, during the offline profiling run, filter out at least one of malloced paths that correspond to a low temperature or malloced paths that correspond to high capacity allocations.

### Claim 15 (depends on 9)

The apparatus of claim 9, further including a memory balancer to, responsive to the tier of memory being unavailable, rebalance the memory across tiers of the memory.

### Claim 16 (depends on 9)

The apparatus of claim 9, wherein the indicator corresponding to the temperature corresponds to a frequency that the buffer allocated to the first path will be accessed by the computer application.

### Claim 17

A method to perform dynamic memory assignments in multi-tiered memory systems, the method comprising:
during an offline profiling run of a computer application:
responsive to a first malloc call function, performing a first backtrace to identify a first path preceding the first malloc function call and identify a size of a buffer in memory allocated to the first path; and
determining an indicator corresponding to a temperature of the buffer allocated to the first path; and
during runtime:
responsive to a second malloc function call, performing a second backtrace to identify a second path preceding the second malloc function call; and
responsive to the second path corresponding to the first path, allocating memory from a tier of memory based on the indicator.

### Claim 18 (depends on 17)

The method of claim 17, wherein:
responsive to the indicator corresponding to a first temperature, the tier of memory is a first tier corresponding to at least one of a first latency and a first bandwidth; and
responsive to the indicator corresponding to a second temperature lower than the first temperature, the tier of memory is a second tier corresponding to at least one of a second latency higher than the first latency and a second bandwidth lower than the first bandwidth.

### Claim 19 (depends on 18)

The method of claim 18, further including, responsive to the indicator corresponding to the second temperature and the first tier has capacity to allocate memory, allocating memory from the first tier of memory.

### Claim 20 (depends on 17)

The method of claim 17, further including:
storing a correspondence between the first path and the temperature in a database during the offline profiling run; and
determining that the second path corresponds to the first path by comparing the second path with the first path.
