ref: cc36d9da74092b8669504747be2a9a3bc80cea14
parent: d353da914d1fcba2055fee396b8555bd079d691f
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Jul 20 17:44:34 EDT 2021
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.
--- a/sys/man/2/brk
+++ b/sys/man/2/brk
@@ -43,7 +43,7 @@
.IR brk .
A call to
.I sbrk
-with a zero argument returns the lowest address
+with a zero argument returns the end address
in the dynamic segment.
.SH SOURCE
.B /sys/src/libc/9sys/sbrk.c
--
⑨