-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate deterministic memory pool #94
Comments
0001-WIP-Integrate-deterministic-memory-pool.patch.gz implementation serves as proof of concept. |
Related: #105 |
HTFH-RT-Search-Cache is a real-time search cache build on top of a Hybrid TLSF Fixed Heap allocator with DLIRS mixed-strategy caching. See also: DLIRS: Improving Low Inter-Reference Recency Set Cache Replacement Policy with Dynamics
|
xvmalloc ever existed in Linux kernel. However, it was removed later. See also: War of allocators: TLSF in action |
Recent report on TLSF, xvMalloc, and zsmalloc. See linux2023-report. |
Fast Efficient Fixed-Size Memory Pool: No Loops and No Overhead
|
The TLSF memory allocation system consists of the following elements:
When a free slot is created or deleted in the memory pool, it is necessary to update the indexing data. Here is an example of how a slot size of 781 bytes is broken down according to the first (fl) and second level (sl) indexes:
The first-level indexing (fl) is done by classifying the size of the slot (minimum 4) by powers of 2 in 13 levels, from fl=3 to fl=15. The table below presents the slot sizes indexed by each first-level (fl) value. Second-level indexing (sl) is carried out by linearly classifying the size of the slot into 16 levels for each first level (fl). Example: For a level fl=5, all the values indexed by the second level range from 2^5 to 2^6-1, or 32 to 63. There are 16 possible levels for sl, so 32/16=2 values for each sl level. The values are thus:
The table below represents each possible fl/sl pair. For each pair, a start of a linked list is stored. This linked list only contains free slots whose minimum size is indicated in the table (the maximum size is not shown for clarity; it corresponds to the next cell's value minus 1). Reference: Arena Allocation |
TLSF (Two-Level Segregated Fit) dynamic memory allocation algorithm is guaranteed to complete allocation and deallocation operations in constant time, suitable for real-time applications.
Reference:
The text was updated successfully, but these errors were encountered: