[TUHS] Memory management in Dennis Ritchie's C Compiler
cym224 at gmail.com
Tue Aug 18 09:06:56 AEST 2020
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). They were removed in
> On a whim, I checked a couple of boxes around here (I haven't used sbrk()
> since malloc() came along):
> The brk and sbrk functions are historical curiosities left over
> from ear-
> lier days before the advent of virtual memory management.
> 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.
> -- Dave
More information about the TUHS