shithub: plan9front

Download patch

ref: 7bd6679c82079db20ea3a9b2b1f08406719b52ec
parent: 90ce513fb0df41c0d6c5cea8dbd612c1859d4392
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	Sun Jul 18 16:21:06 2021
+++ b/sys/man/2/brk	Tue Jul 20 17:44:34 2021
@@ -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