4 ms·
I'm surprised that anything still uses brk. Mentally, I've thrown it in the same pile as fork or gets, but it's been a while since I've written a OS-level memo
by oddity 8y ago
I'm surprised that anything still uses brk. Mentally, I've thrown it in the same pile as fork or gets, but it's been a while since I've written a OS-level memory allocator, so maybe my assumptions are incorrect.
- zbentley 8y ago> Mentally, I've thrown it in the same pile as fork or gets Why is fork included there? It's extremely useful in a wide variety of modern applications. Or are you referring to specific libc functions rather than the system call?
- oddity 8y agoComparing fork to gets is perhaps a bit unfair to fork. I was being lazy when I tried to suggest a spectrum of deservedly rare api calls. :) It’s not broken like gets or outdated like sbrk, but it doesn’t compose well with other parts of the system and there are enough caveats that I recommend more use-case targeted alternatives wherever possible. For example: http://www.evanjones.ca/fork-is-dangerous.html http://www.evanjones.ca/fork-is-dangerous.html