Subject: misc/6833: sbrk/brk man page doesn't mention sbrk very well
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 01/17/1999 23:41:48
>Synopsis: sbrk/brk man page doesn't mention sbrk very well
>Responsible: misc-bug-people (Misc Bug People)
>Arrival-Date: Sun Jan 17 21:50:01 1999
>Originator: Brian Grayson
Parallel and Distributed Systems
Electrical and Computer Engineering
The University of Texas at Austin
>Release: Jan 15, 1998
1. sbrk isn't described very well. There is a
commented-out description of sbrk, but I don't really
like "allocates chunks" -- it doesn't make the data
segment sound like one continuous address range.
2. To me, "addressing is restricted between ..." is
ambiguous: is addressing restricted to be between ...,
or is addressing not permitted at all between ...? Of
course, the correct answer is "not permitted." With
uses of mmap() and sbrk()/brk() at the same time, this
isn't quite true, as a mmap'd section could end up
being in this range. Maybe "Unless explicitly allowed
via mmap() or other actions, data accesses are not permitted
to any address between .Fa addr and the lowest stack
pointer to the stack segment."
My suggestions are:
--- brk.2.dist Sun Jan 17 22:58:25 1999
+++ brk.2 Sun Jan 17 23:27:36 1999
@@ -58,7 +58,7 @@
segment (uninitialized data) to
(immediately above bss).
-Data addressing is restricted between
+Data addressing is not permitted between
and the lowest stack pointer to the stack segment.
Memory is allocated by
@@ -68,6 +68,14 @@
is not evenly divisible by the system page size, it is increased
to the next page boundary.
+function increments the program break by
+bytes. Note that
+may be negative.
.\" .Nm sbrk