US 11,907,206 B2
Memory pooling in high-performance network messaging architecture
Eric Tesse, New York, NY (US)
Assigned to CHARLES SCHWAB & CO., INC., San Francisco, CA (US)
Filed by TD Ameritrade IP Company, Inc., Omaha, NE (US)
Filed on Jul. 19, 2021, as Appl. No. 17/379,269.
Prior Publication US 2023/0026120 A1, Jan. 26, 2023
Int. Cl. G06F 16/23 (2019.01); G06F 12/02 (2006.01); H04L 69/324 (2022.01); G06F 16/2455 (2019.01); G06F 16/22 (2019.01); G06F 16/903 (2019.01)
CPC G06F 16/2379 (2019.01) [G06F 12/0223 (2013.01); G06F 16/2255 (2019.01); G06F 16/2264 (2019.01); G06F 16/2358 (2019.01); G06F 16/24562 (2019.01); G06F 16/90344 (2019.01); H04L 69/324 (2013.01); G06F 2212/1041 (2013.01)] 22 Claims
OG exemplary drawing
 
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.