pile Code
Brought to you by:
ad_may
File | Date | Author | Commit |
---|---|---|---|
src | 2023-01-20 |
![]() |
[712ab9] Ghost |
test | 2023-01-20 |
![]() |
[712ab9] Ghost |
CMakeLists.txt | 2021-09-09 |
![]() |
[be142c] Convert to m4 |
README | 2021-09-05 |
![]() |
[f8e227] Tidy |
With the advent of huge virtual address spaces, malloc became redundant. It was never such a great idea in the first place to offer a one-stop-shop for all different sizes of block, considering the defrag problems and complexity that led to. It would have been simpler to offer multiple mini-heaps each offering a single size of block, but at the time people were forced into it because all memory was physical and the same address space was shared between programs, so they couldn't risk a program running out of memory for one block type whilst hogging lots for another. Nowadays, address space is effectively infinite so that argument doesn't apply, and it is preferable to run one mini-heap for each struct in your program. This library provides just that, backed by memory mapped files for persistence. The heaps are just arrays, so array indices can be used to refer to objects, which are half the size of pointers. Build with cmake -B build && make -C build && build/test/piletest