Parallel Dynamic Memory Allocation Using A Lock-Free FIFO
First Claim
1. A method of allocating memory, the method comprising:
- receiving a memory allocation request specifying an amount of memory;
identifying first-in first-out sub-system (FIFO) node size based on the amount of memory;
selecting a first FIFO that is populated with FIFO nodes of the FIFO node size; and
popping a FIFO head node from the first FIFO to satisfy the memory allocation request.
2 Assignments
0 Petitions
Accused Products
Abstract
One embodiment of the present invention sets forth a technique for dynamically allocating memory using one or more lock-free FIFOs. One or more lock-free FIFOs are populated with FIFO nodes, where each FIFO node represents a memory allocation of a predetermined size. Each particular lock-free FIFO includes memory allocations of a single size. Different lock-free FIFOs may include memory allocations for different sizes to service allocation requests for different size memory allocations. A lock-free mechanism is used to pop FIFO nodes from the FIFO. The use of the lock-free FIFO allows multiple consumers to simultaneously attempt to pop the head FIFO node without first obtaining a lock to ensure exclusive access of the FIFO.
43 Citations
20 Claims
-
1. A method of allocating memory, the method comprising:
-
receiving a memory allocation request specifying an amount of memory; identifying first-in first-out sub-system (FIFO) node size based on the amount of memory; selecting a first FIFO that is populated with FIFO nodes of the FIFO node size; and popping a FIFO head node from the first FIFO to satisfy the memory allocation request. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A computing system, comprising:
-
a memory heap; a first first-in first-out sub-system (FIFO) that is populated with FIFO nodes that each represent a portion of memory from the memory heap; and a memory allocation engine that is configured to; receive a memory allocation request specifying an amount of memory; identify a FIFO node size based on the amount of memory; select the first FIFO that is populated with the FIFO nodes, wherein the FIFO nodes are of the FIFO node size; and pop a FIFO head node from the first FIFO to satisfy the memory allocation request.
-
-
12. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to allocate memory, by performing the steps of:
-
receiving a memory allocation request specifying an amount of memory; identifying first-in first-out sub-system (FIFO) node size based on the amount of memory; selecting a first FIFO that is populated with FIFO nodes of the FIFO node size; and popping a FIFO head node from the first FIFO to satisfy the memory allocation request. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20)
-
Specification