3 ms·
>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.
by nemo1618 8y ago
>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 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.
- gok 8y agoNice!