MmapCell
A common use case for mmap
in C is to cast the mmap backed region to a struct:
MyStruct* mmap_backed_mystruct;
int fd;
fd = ;
;
mmap_backed_mystruct = ;
Example
This is a helpful wrapper for the same usecase:
use MmapCell;
let cell = unsafe .unwrap;
let mmap_backed_mystruct = cell.get_mut;
mmap_backed_mystruct.thing1 = 3;