4 ms·
This reminds me of Perl’s esoteric $^M variable. You assign it some giant string, and in an out-of-memory condition, the value is cleared to free up some emerge
by raldi 6y ago
This reminds me of Perl’s esoteric $^M variable. You assign it some giant string, and in an out-of-memory condition, the value is cleared to free up some emergency space for graceful shutdown.
“To discourage casual use of this advanced feature, there is no English long name for this variable.”
But the language-build flag to enable it has a great name: -DPERL_EMERGENCY_SBRK, obviously inspired by emergency brake.
- amock 6y agoI think it likely relates to https://en.m.wikipedia.org/wiki/Sbrk https://en.m.wikipedia.org/wiki/Sbrk.
- raldi 6y agoYes, of course. That’s what makes the pun work.
- deleted 6y ago[deleted]
- Wibjarm 6y agoI'd expect the name is also inspired by the sbrk(2) system call, so you can allocate some memory "for emergency use" if needed.