Commits on Oct 20, 2019
Oct 20, 2019
MacOS still silently fails mmap on inherited shm file descriptors, and we have to reopen the file itself.
Commits on Oct 19, 2019
This is an improvement over 831428f. Instead of initializing a sentinel at the end of the arena, we simply check that there is enough space for the next chunk to exist. If the arena is resized we perform a new search for the best free chunk. It's not ideal but it's simple.
Turns out this approach adds unnecessary complexity to the current implementation, and forces a fragmentation of the arena at the extension point. This reverts commit 831428f.
Commits on Oct 12, 2019
Oct 12, 2019
The arena code makes allocation entries resize themselves to fit the allocated data as closely as possible. In some cases, the remaining size would not be enough for the next entry metadata to be allocated, which would of course cause a segmentation fault when trying to initialize it. To address that, we initialize a sentinel at the end of the arena, which takes the form of an allocation entry of size 0. As a bonus, this makes iteration more straightforward as it becomes sufficient to compare the current entry pointer to the address of the sentinel.