# US 11,907,206 B2 · Memory pooling in high-performance network messaging architecture

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

- Number: US 11,907,206 B2
- Document ID: US11907206B2
- Status: Granted
- Kind: B2
- Application number: 17/379,269
- Filed: 2021-07-19
- Published: 2023-01-26
- Granted: 2024-02-20
- Earliest claimed: 2021-07-19
- Assignees: Charles Schwab & Co., Inc.
- Applicants: TD Ameritrade IP Company, Inc.
- Inventors: Eric Tesse
- Web page: https://patentgrep.com/patent/US11907206B2

## CPC

- G06F 12/023: {Free address space management}
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 12/0223: {User address space allocation, e.g. contiguous or non contiguous base addressing}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 16/2237: {Vectors, bitmaps or matrices}
- G06F 16/2255: {Hash tables}
- G06F 16/2264: {Multidimensional index structures}
- G06F 16/2358: {Change logging, detection, and notification (replication G06F16/27)}
- G06F 16/24552: {Database cache management}
- G06F 16/24562: {Pointer or reference processing operations}
- G06F 16/90344: {by using string matching techniques}
- H04L 69/324: in the data link layer [OSI layer 2], e.g. HDLC
- G06F 2212/1041: Resource optimization
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A memory management system implements instructions including maintaining multiple pool data structures, each associated with a linked list of objects and including a head pointer pointing to the first element in the linked list. The instructions include, in response to a first object no longer being needed, recycling the first object by identifying a first pool data structure that corresponds to the first object and inserting the first object into the linked list without deallocating the memory for the first object. The instructions include, in response to a new object request, identifying a second pool data structure according to a feature of the new object. If the corresponding linked list is empty, memory is allocated for the new object and the new object is assigned to the second pool data structure. If the linked list is not empty, the first object is removed from the linked list and returned.

## Claims

### Claim 1

A memory management system comprising:
memory hardware configured to store instructions; and
processing hardware configured to execute the instructions stored by the memory hardware, wherein the instructions include:
maintaining a plurality of pool data structures, wherein each pool data structure of the plurality of pool data structures:
is associated with a respective linked list of objects, and
includes a head pointer configured to point to a first element in the linked list of objects;
in response to a first object no longer being needed, recycling the first object by:
identifying a first pool data structure, from the plurality of pool data structures, that corresponds to the first object, and
inserting the first object into a beginning position of the linked list associated with the first pool data structure without deallocating memory for the first object; and
in response to a request for a new object from a requestor:
identifying a second pool data structure from the plurality of pool data structures according to a feature of the new object,
determining whether the linked list associated with the second pool data structure is empty,
in response to the linked list associated with the second pool data structure being empty:
allocating memory for the new object,
assigning the new object to the second pool data structure, and
returning the new object to the requestor, and
in response to the linked list associated with the second pool data structure not being empty:
selecting a head object from the linked list associated with the second pool data structure,
removing the head object from the linked list associated with the second pool data structure, and
returning the head object to the requestor as the new object, wherein a state of the head object is cleared prior to the head object being returned.

### Claim 2 (depends on 1)

The memory management system of claim 1 wherein the first pool data structure is identified based on a data field of the first object.

### Claim 3 (depends on 2)

The memory management system of claim 2 wherein the data field is an object reference to the first pool data structure.

### Claim 4 (depends on 2)

The memory management system of claim 2 wherein:
each pool data structure of the plurality of pool data structures is associated with a unique identifier; and
the data field stores the unique identifier associated with the first pool data structure.

### Claim 5 (depends on 1)

The memory management system of claim 1 wherein inserting the first object into a beginning position of the linked list includes:
reading the head pointer of the first pool data structure,
configuring a pointer of the first element to be equal to the head pointer of the first pool data structure, and
selectively updating the head pointer of the first pool data structure to point to the first object.

### Claim 6 (depends on 5)

The memory management system of claim 5 wherein selectively updating the head pointer is an atomic operation performed only in response to the head pointer still being equal to the pointer of the first object.

### Claim 7 (depends on 1)

The memory management system of claim 1 wherein:
selecting the head object includes reading the head pointer of the second pool data structure and identifying a target of the head pointer as the head object; and
removing the head object from the linked list includes:
reading a pointer value of the head object, and
selectively updating the head pointer of the first pool data structure to be equal to the pointer value.

### Claim 8 (depends on 7)

The memory management system of claim 7 wherein selectively updating the head pointer is an atomic operation performed only in response to the head pointer still pointing to the head object.

### Claim 9 (depends on 1)

The memory management system of claim 1 wherein the determining whether the linked list associated with the second pool data structure is empty is based on the head pointer of the second pool data structure such that the head pointer being null indicates the linked list is empty.

### Claim 10 (depends on 1)

The memory management system of claim 1 wherein:
the plurality of pool data structures includes a plurality of sets of pool data structures; and
each of the plurality of sets of pool data structures corresponds to a respective object type.

### Claim 11 (depends on 1)

The memory management system of claim 1 wherein:
the first object is an instantiation of a first class of a plurality of classes;
the plurality of pool data structures includes a plurality of sets of pool data structures; and
each of the plurality of sets of pool data structures corresponds to a respective one of the plurality of classes.

### Claim 12 (depends on 10)

The memory management system of claim 10 wherein:
a first set of pool data structures corresponds to a message object type; and
a second set of pool data structures corresponds to an array object type.

### Claim 13 (depends on 1)

The memory management system of claim 1 wherein:
a set of pool data structures of the plurality of pool data structures corresponds one-to-one to array sizes; and
the second pool data structure is further identified according to a requested size of the new object.

### Claim 14 (depends on 13)

The memory management system of claim 13 wherein the second pool data structure is identified by searching through a subset of the set of pool data structures that correspond to array sizes greater than or equal to the requested size.

### Claim 15 (depends on 14)

The memory management system of claim 14 wherein the second pool data structure is identified such that no other pool data structures of the set of pool data structures meet all three of the following criteria:
a corresponding array size of the other pool data structure is smaller than a corresponding array size of the second pool data structure;
the corresponding array size of the other pool data structure is greater than or equal to the requested size; and
the linked list associated with the other pool data structure is non-empty.

### Claim 16 (depends on 1)

The memory management system of claim 1 wherein:
a set of pool data structures of the plurality of pool data structures corresponds one-to-one to processing threads; and
the second pool data structure is further identified according to an identity of a presently executing processing thread.

### Claim 17 (depends on 1)

The memory management system of claim 1 wherein clearing the head object comprises:
iterating through top-level entries of the head object; and
setting a flag for each of the top-level entries to indicate that valid data is absent.

### Claim 18 (depends on 17)

The memory management system of claim 17 wherein:
the top-level entries of the head object are stored in an array; and
iterating through the top-level entries of the head object includes iterating through the array of the top-level entries of the head object.

### Claim 19 (depends on 17)

The memory management system of claim 17 wherein setting the flag for each entry of the entries includes setting a Boolean value of the entry to false.

### Claim 20 (depends on 1)

The memory management system of claim 1 wherein clearing the head object is performed as the head object is recycled.

### Claim 21

A method comprising:
maintaining a plurality of pool data structures, wherein each pool data structure of the plurality of pool data structures:
is associated with a respective linked list of objects, and
includes a head pointer configured to point to a first element in the linked list of objects;
in response to a first object no longer being needed, recycling the first object by:
identifying a first pool data structure, from the plurality of pool data structures, that corresponds to the first object, and
inserting the first object into a beginning position of the linked list associated with the first pool data structure without deallocating memory for the first object; and
in response to a request for a new object from a requestor:
identifying a second pool data structure from the plurality of pool data structures according to a feature of the new object,
determining whether the linked list associated with the second pool data structure is empty,
in response to the linked list associated with the second pool data structure being empty:
allocating memory for the new object,
assigning the new object to the second pool data structure, and
returning the new object to the requestor, and
in response to the linked list associated with the second pool data structure not being empty:
selecting a head object from the linked list associated with the second pool data structure,
removing the head object from the linked list associated with the second pool data structure, and
returning the head object to the requestor as the new object, wherein a state of the head object is cleared prior to the head object being returned.

### Claim 22

A non-transitory computer-readable medium comprising instructions including:
maintaining a plurality of pool data structures, wherein each pool data structure of the plurality of pool data structures:
is associated with a respective linked list of objects, and
includes a head pointer configured to point to a first element in the linked list of objects;
in response to a first object no longer being needed, recycling the first object by:
identifying a first pool data structure, from the plurality of pool data structures, that corresponds to the first object, and
inserting the first object into a beginning position of the linked list associated with the first pool data structure without deallocating memory for the first object; and
in response to a request for a new object from a requestor:
identifying a second pool data structure from the plurality of pool data structures according to a feature of the new object,
determining whether the linked list associated with the second pool data structure is empty,
in response to the linked list associated with the second pool data structure being empty:
allocating memory for the new object,
assigning the new object to the second pool data structure, and
returning the new object to the requestor, and
in response to the linked list associated with the second pool data structure not being empty:
selecting a head object from the linked list associated with the second pool data structure,
removing the head object from the linked list associated with the second pool data structure, and
returning the head object to the requestor as the new object, wherein a state of the head object is cleared prior to the head object being returned.
