On 08/17/20 18:47, Dave Horsfall wrote:
On Mon, 17 Aug 2020, Dibyendu Majumdar wrote:
From Wikipedia:
sbrk and brk are considered legacy even by 1997 standards (Single UNIX
Specification v2 or POSIX.1-1998).[5] They were removed in
POSIX.1-2001.[6]
On a whim, I checked a couple of boxes around here (I haven't used sbrk()
since malloc() came along):
Mac:
The brk and sbrk functions are historical curiosities left over
from ear-
lier days before the advent of virtual memory management.
FreeBSD:
The brk() and sbrk() functions are legacy interfaces from before the
advent of modern virtual memory management.
Both of them come right after the DESCRIPTION header.
More whimsy from "man sbrk" on Solaris 10:
The use of mmap(2) is now preferred because it can be used
portably with all other memory allocation functions and with
any function that uses other allocation functions.
N.
-- Dave