Re:Mio – Cross-platform header-only C++11 library for memory...
by nemo1618 on Saturday October 20, 2018 @11:24PM
(#18266592)
>mmap() makes it easy to use read-only memory, which catches memory corruption bugs
You might appreciate this toy Go package I hacked together: https://github.com/lukechampine/freeze
It uses mmap and mprotect to "freeze" Go objects; if you try to modify a frozen object, the program crashes.
Re:Mio – Cross-platform header-only C++11 library for memory...
by gok on Sunday October 21, 2018 @12:16AM
(#18266706)
Nice!
Re:Mio – Cross-platform header-only C++11 library for memory...
by jzwinck on Saturday October 20, 2018 @08:25PM
(#18266202)
Memory mapped I/O actually prevents the use of huge pages if the backing storage is an actual disk. See https://lwn.net/Articles/718102/
Do you know of a way around that, aside from building your own patched kernel?
I <3 mmap