High performance memory allocator
Abstract
Aspects of the disclosure are directed to a memory allocator for assigning contiguous memory space for data packets in on-chip memory of a network interface card. The memory allocator includes a plurality of sub-allocators that correspond to a structure of entries, where each entry represents a quanta of memory allocation. The sub-allocators are organized in decreasing size in the memory allocator based on the amount of memory quanta they can allocate.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 14 · Forward citations: 0.
Claims (8 — 1 Independent, 7 Dependent)
- Claim 1Independent Claim
A method for assigning contiguous memory space for data packets, comprising: receiving, with one or more processors, an allocation request to assign a number of continuous pointers to a sub-allocator memory of a plurality of sub-allocator memories that represent different quantas of memory allocation; searching, with the one or more processors, for an available entry in a summary vector that corresponds to an available row in a sub-allocator memory; selecting, with the one or more processors, a row in a sub-allocator memory based on a first available entry in the summary vector; selecting, with the one or more processors, a first available entry in the selected row to provide addresses for the number of continuous pointers; and marking, with the one or more processors, the selected entry as unavailable in the summary vector.
- Claim 2Depends on #1
The method of claim 1, further comprising: determining, with the one or more processors, corresponding entries to the selected entry in other sub-allocator memories; and marking, with the one or more processors, the corresponding entries as unavailable.
- Claim 3Depends on #2
The method of claim 2, further comprising resetting, with the one or more processors, entries in the summary vector based on the selected entry marked as unavailable and the corresponding entries marked as unavailable.
- Claim 4Depends on #1
The method of claim 1, wherein the summary vector being searched matches the number of continuous pointers.
- Claim 5Depends on #1
The method of claim 1, wherein the number of continuous pointers corresponds to a number of cells in a data packet.
- Claim 6Depends on #1
The method of claim 1, further comprising determining, with the one or more processors, the number of continuous pointers to assign based on an incoming allocation request size and a cell size.
- Claim 7Depends on #1
The method of claim 1, further comprising: receiving, with the one or more processors, a deallocation request to remove a pointer from an entry in a sub-allocator memory; and marking, with the one or more processors, the entry from which the pointer is being removed as available.
- Claim 8Depends on #7
The method of claim 7, further comprising: determining, with the one or more processors, corresponding entries to the entry from which the pointer is being removed in other sub-allocator memories; and marking, with the one or more processors, the corresponding entries to the entry from which the pointer is being removed as available.
Technical Overview & Description
BACKGROUND Memory space related to data packet transmission over a network can be allocated in granularity of cells, with support for an amount of cells in the memory. For example, cell sizes can be configured as 256B, 512B, or 1 KB with support for up to 512K cells. A data packet can include a single control cell, which stores metadata for the data packet, and a plurality of data cells. Depending on the data packet size, multiple data cells in the memory may need to be allocated to the data packet. However, allocating cells non-continuously can result in larger read latency since the control cell would have to be fetched prior to issuing a read for the data cells, since the control cell would contain addresses for the data cells. BRIEF SUMMARY Aspects of the disclosure are directed to a memory allocator for assigning contiguous memory space for data packets in on-chip memory of a network interface card. The memory allocator includes a plurality of sub-allocators that correspond to a structure of entries, where each entry represents a quanta of memory allocation. The sub-allocators are organized in decreasing size in the memory allocator based on the amount of memory quanta they can allocate. An aspect of the disclosure provides for a method for assigning contiguous memory space for data packets. The method includes: receiving, with one or more processors, an allocation request to assign a number of continuous pointers to a sub-allocator memory of a plurality of sub-allocator memories; searching, with the one or more processors, for an available entry in a summary vector that corresponds to an available row in a sub-allocator memory; selecting, with the one or more processors, a row in a sub-allocator memory based on a first available entry in the summary vector; selecting, with the one or more processors, a first available entry in the selected row to provide addresses for the number of continuous pointers; and marking, with the one or more processors, the selected
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (14)
| Patent | Title | Year | Citations |
|---|
Non-Patent Literature (1)
- Extended European Search Report for European Patent Application No. 23155272.0 dated Sep. 8, 2023. 7 pages.