]> git.lizzy.rs Git - plan9front.git/commit
brk(2): sbrk(0) returns end address, not the base
authorcinap_lenrek <cinap_lenrek@felloff.net>
Tue, 20 Jul 2021 21:44:34 +0000 (21:44 +0000)
committercinap_lenrek <cinap_lenrek@felloff.net>
Tue, 20 Jul 2021 21:44:34 +0000 (21:44 +0000)
commit7bd6679c82079db20ea3a9b2b1f08406719b52ec
tree8d23103118485fab241e2a789eb32c7606b27928
parent90ce513fb0df41c0d6c5cea8dbd612c1859d4392
brk(2): sbrk(0) returns end address, not the base

sbrk(0) returns the current end address of the BSS segment,
not the base. This might have been confused with the behaviour
of segbrk(), which when given a zero address returns the base.
sys/man/2/brk