News for hackers. Stuff that matters.
Re:The history of Unix's confusing set of low-level ways to ... by kazinator on Wednesday November 03, 2021 @02:46AM (#29091735)
So much amusing past tense there, given that Linux has a sbrk() function and Glibc cheerfully uses it for small allocations in single-threaded programs. This stuff is today.
Re:The history of Unix's confusing set of low-level ways to ... by trasz on Wednesday November 03, 2021 @04:09AM (#29092161)
On Linux. On FreeBSD it’s all ancient history; kernel doesn’t even implement brk() on newer architectures.
Re:The history of Unix's confusing set of low-level ways to ... by kazinator on Wednesday November 03, 2021 @01:08PM (#29097460)
I just found MacOS, Solaris and OpenBSD man pages documenting sbrk and brk.
Re:The history of Unix's confusing set of low-level ways to ... by trasz on Wednesday November 03, 2021 @02:24PM (#29098485)
There's even a FreeBSD one (https://man.freebsd.org/brk), which doesn't change the fact that this syscall is not implemented on eg aarch64 and riscv64.
Re:The history of Unix's confusing set of low-level ways to ... by kazinator on Wednesday November 03, 2021 @06:06PM (#29100977)
Well, it doesn't change the fact because it's too busy documenting the fact in the first paragraph.

OpenBSD's page calls them "curiosities from before the days of virtual memory management" in the first paragraph, without mentioning that they are missing in any targets. (Still, they are entirely compatible with virtual memory management.)