OpenBSD founder Theo de Raadt first proposed a new system call, called
mimmutable()
, at the beginning of September. After numerous revisions, the system call looks to be merged as:int mimmutable(void *addr, size_t len);
A call to
mimmutable()
will render the mapping of thelen
bytes of memory starting ataddr
immutable, meaning that the kernel will not allow any changes to either the memory protections or the mapping in that range. As a result, system calls likemmap()
ormprotect()
that would affect that range will, instead, fail.
Tag: c
Tiny Scheme interpreters
There are numerous small Lisp/Scheme implementations, and probably most of them are unfinished or unmaintained. I found serious, production-ready tiny Scheme interpreters for you to embed in your C or C++ programs.
Duktape — embeddable, compact JavaScript engine
While large companies are in the race for performance of their JavaScript implementations, making them more complicated, there appeared something different: a compact embeddable JavaScript VM called Duktape.
Continue reading “Duktape — embeddable, compact JavaScript engine”
miniz — fast single-file ZIP implementation in C
I have an unhealthy obsession with one-file implementations of useful things in C, which you can just drop into your project and use without configuring libraries with dozens of files. Miniz is one such project: it is a single 225 KB miniz.c
, which contains a zlib
replacement plus functions to read/write ZIP files.
Continue reading “miniz — fast single-file ZIP implementation in C”
linenoise — a tiny readline replacement
Linenoise is a small self-contained line editing library written in C by Salvatore Sanfilippo of Redis fame, aimed at replacing the monster readline and libedit libraries. It is used in Redis, MongoDB, and Android.