3 ms·
I saw the title and thought "oh heck this isn't right at all"... Set VM Overcommit to zero on an embedded system with no swap (a Raspberry Pi will do nicely).
by philpem 7y ago
I saw the title and thought "oh heck this isn't right at all"...
Set VM Overcommit to zero on an embedded system with no swap (a Raspberry Pi will do nicely).
Write a C program that malloc()'s all the RAM.
Watch malloc start to fail when you hit the RAM limit and the kernel has dumped all the I/O cache it can.
- KirinDave 7y agoI think the author uses a hyperbolistic title, but if you read the article it s addressed that there are ways it can fail. The larger point is that very few users of malloc understand its semantics, and in fact you can't know exactly how malloc will behave without knowing things about the runtime configuration of the system (as opposed to the hardware availability as many people like to think the simple case is).