# US 12,007,892 B2 · External memory as an extension to local primary memory

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

- Number: US 12,007,892 B2
- Document ID: US12007892B2
- Status: Granted
- Kind: B2
- Application number: 18/320,813
- Filed: 2023-05-19
- Published: 2023-09-21
- Granted: 2024-06-11
- Earliest claimed: 2020-01-31
- Assignees: Kove IP, LLC
- Applicants: Kove IP, LLC
- Inventors: Timothy A. Stabrawa; Zachary A Cornelius; John Overton; Andrew S. Poling; Jesse Taylor
- Web page: https://patentgrep.com/patent/US12007892B2

## CPC

- G06F 12/0646: {Configuration or reconfiguration}
- G06F 21/6218: {to a system of files or objects, e.g. local or distributed file system or database}
- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/0631: {by allocating resources to storage systems}
- G06F 3/0685: {Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays}
- G06F 9/5016: {the resource being the memory}
- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 12/0893: Caches characterised by their organisation or structure
- G06F 2212/1008: Correctness of operation, e.g. memory ordering
- G06F 2212/152: Virtualized environment, e.g. logically partitioned system
- G06F 2212/282: Partitioned cache
- G06F 2221/2107: File encryption
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and systems are provided for allocating memory. An example method includes: allocating, for an application logic, a region of external primary memory included in a memory appliance; selecting, by a client device in response to a first request to reclaim a first portion of local primary memory in the client device, a portion of external primary memory from the region of external primary memory; copying data from the first portion of local primary memory to the portion of external primary memory; and converting a portion of a first virtual address space at the client device by remapping at least one virtual address in the first virtual address space at the client device from the first portion of local primary memory to the portion of external primary memory.

## Claims

### Claim 1

A method comprising:
allocating, for an application logic, a region of external primary memory included in a memory appliance;
selecting, by a client device in response to a first request to reclaim a first portion of local primary memory in the client device, a portion of external primary memory from the region of external primary memory;
copying data from the first portion of local primary memory to the portion of external primary memory; and
converting a portion of a first virtual address space at the client device by remapping at least one virtual address in the first virtual address space at the client device from the first portion of local primary memory to the portion of external primary memory.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first portion of local primary memory is selected by:
collecting, periodically or in response to an event or a condition, values stored in one or more portion tracking data structures into a collection, wherein each of the portion tracking data structures corresponds to a portion of local primary memory, and wherein values stored in the each of the portion tracking data structures are statistical data for the portion of local primary memory corresponding to the each of the portion tracking data structures; and
selecting the first portion of local primary memory based on the collection.

### Claim 3 (depends on 2)

The method of claim 2, wherein the statistical data comprises at least one of:
a count of accesses;
a count of page faults;
a time record; or
a generation counter.

### Claim 4 (depends on 2)

The method of claim 2, wherein:
the event comprises at least one of:
a page fault associated with the first virtual address space; or
a request to access the first virtual address space; and
the condition comprises at least one of:
running out of entries in the collection; or
running out of useful entries in the collection.

### Claim 5 (depends on 2)

The method of claim 2, wherein:
the collection is a sorted collection which is sorted according to a reclaim strategy; or
after collecting the values stored in the one or more portion tracking data structures into the collection, the method further comprises:
sorting the values in the collection according to the reclaim strategy.

### Claim 6 (depends on 5)

The method of claim 5, wherein the reclaim strategy comprises at least one of:
a least-recently-used strategy based on a timestamp or a generation counter; or
a not-frequently-used strategy based on a count of accesses or a count of page faults.

### Claim 7 (depends on 2)

The method of claim 2, wherein selecting the first portion of local primary memory based on the collection comprises at least one of:
selecting a portion of local primary memory identified by an identifier associated with a minimum or maximum value in the collection as the first portion of local primary memory;
selecting a portion of local primary memory identified by an identifier associated with a value in the collection that is below or above a threshold value as the first portion of local primary memory; or
randomly selecting one or more candidate portions of local primary memory, each of the one or more candidate portions mapping to a value in the collection, and selecting a portion of local primary memory from the one or more candidate portions of local primary memory as the first portion of local primary memory if the value corresponding to the portion of local primary memory is below or above the threshold value.

### Claim 8 (depends on 7)

The method of claim 7, wherein the threshold value comprises at least one of:
a mean value of values stored in the collection;
a median value of the values stored in the collection;
a percentile value of the values stored in the collection;
a value calculated based on one or more of the values stored in the collection;
a value based on a timestamp; or
a value based on a generation counter.

### Claim 9 (depends on 2)

The method of claim 2, wherein collecting the values stored in the one or more portion tracking data structures into the collection comprises:
collecting the values stored in the one or more portion tracking data structures by speculatively referencing entries in the one or more portion tracking data structures, wherein each of the entries corresponds to a portion of local primary memory and is able to be individually locked when referenced.

### Claim 10 (depends on 9)

The method of claim 9, wherein in response to an entry in the one or more portion tracking data structures being already locked, skipping collecting a value corresponding to the entry.

### Claim 11 (depends on 1)

The method of claim 1, wherein the application logic comprises at least one of:
a virtualization instance;
a virtual machine;
a container;
a jail; or
a zone.

### Claim 12 (depends on 1)

The method of claim 1, further comprising;
invalidating a page table entry associated with the at least one virtual address; or
marking the page table entry associated with the at least one virtual address as not present.

### Claim 13 (depends on 1)

The method of claim 1, further comprising:
selecting, by the client device, in response to a second request to reclaim a second portion of local primary memory, and in a determination that the external primary memory is insufficient for the second request, a portion of a swap space; and
copying data from the second portion of local primary memory to the portion of the swap space.

### Claim 14 (depends on 13)

The method of claim 13, wherein the swap space comprises at least one of:
a swap file;
a swap partition;
a remote swap device which is accessible via a first storage protocol; or
a local swap device which is accessible over a local bus via a second storage protocol.

### Claim 15 (depends on 1)

The method of claim 1, wherein before copying the data from the first portion of local primary memory to the portion of external primary memory, the method further comprises:
marking at least one page table entry in the first virtual address space as one of: not writable; invalid; clean; not dirty; not modified; or not present.

### Claim 16 (depends on 1)

The method of claim 1, wherein before copying the data from the first portion of local primary memory to the portion of external primary memory, the method further comprises:
unmapping at least one page table entry in the first virtual address space; or
restricting access to the at least one page table entry in the first virtual address space.

### Claim 17 (depends on 1)

The method of claim 1, wherein at least a portion of a second virtual address space is mapped to the first portion of local primary memory in the client device before the first request to reclaim the first portion of local primary memory, the method further comprising:
remapping the at least the portion of the second virtual address space to the portion of external primary memory.

### Claim 18 (depends on 1)

The method of claim 1, further comprising:
in response to the first virtual address space being accessed or modified, aborting remapping the at least one virtual address in the first virtual address space.

### Claim 19 (depends on 1)

The method of claim 1, wherein the memory appliance is a peripheral of the client device.

### Claim 20

A client device comprising:
a processor; and
a local primary memory in communication with the processor, the local primary memory comprising: an application logic unit; and a client logic unit configured to:
allocate, for the application logic, a region of external primary memory included in a memory appliance;
select, in response to a first request to reclaim a first portion of local primary memory in the client device, a portion of external primary memory from the region of external primary memory;
copy data from the first portion of local primary memory to the portion of external primary memory; and
convert a portion of a first virtual address space at the client device by remapping at least one virtual address in the first virtual address space at the client device from the first portion of local primary memory to the portion of external primary memory.

### Claim 21

A non-transitory storage medium for storing computer readable instructions, the computer readable instructions, when executed by a processor of a client device, causing the processor to:
allocate, for an application logic, a region of external primary memory included in a memory appliance;
select, in response to a first request to reclaim a first portion of local primary memory in the client device, a portion of external primary memory from the region of external primary memory;
copy data from the first portion of local primary memory to the portion of external primary memory; and
convert a portion of a first virtual address space at the client device by remapping at least one virtual address in the first virtual address space at the client device from the first portion of local primary memory to the portion of external primary memory.
