Avoid calling `munmap()`
Plebeia uses Cstruct
, and Cstruct
uses Unix.map_file
. It does not support resizing the mmap, therefore we have to munmap
then mmap
again when the context file is expanded. This resets the page table of the process for the mmap completely and causes lots of minor page faults after the expansion.
To avoid this unnecessary munmap()
calls, we should build our own C binding for mmap'ed file. It can also support uint32 get and set via 63bit int without boxing.