Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/sys Restore some information about the page roundin...



details:   https://anonhg.NetBSD.org/src/rev/86c6d5e024b1
branches:  trunk
changeset: 474644:86c6d5e024b1
user:      perry <perry%NetBSD.org@localhost>
date:      Wed Jul 14 16:24:48 1999 +0000

description:
Restore some information about the page rounding behavior of these
functions, with a little bit of a caution that the page rounding
behavior isn't mentioned in standards documents that mention brk/sbrk.
Klaus removed this before, but I'm not sure why, and I've been unable
to reach him about the matter after trying for several days. The
information about the behavior has always been in the page and is
important for developers to know about.

diffstat:

 lib/libc/sys/brk.2 |  20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r c437a89fc3b5 -r 86c6d5e024b1 lib/libc/sys/brk.2
--- a/lib/libc/sys/brk.2        Wed Jul 14 09:18:20 1999 +0000
+++ b/lib/libc/sys/brk.2        Wed Jul 14 16:24:48 1999 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: brk.2,v 1.20 1999/07/12 21:55:19 kleink Exp $
+.\"    $NetBSD: brk.2,v 1.21 1999/07/14 16:24:48 perry Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -49,7 +49,7 @@
 .Sh DESCRIPTION
 .Bf -symbolic
 The brk and sbrk functions are legacy interfaces from before the
-advent of virtual memory management.
+advent of modern virtual memory management.
 .Ef
 .Pp
 The
@@ -63,6 +63,22 @@
 uninitialized data segment (also known as the
 .Dq BSS ) .
 .Pp
+In
+.Nx ,
+the break must be at an even page boundary.  If
+.Fn brk
+or
+.Fn sbrk
+are asked for a non-integral number of pages, the address of the break
+will be rounded up to the next highest page boundary.
+Note that this page-aligning behavior is not standardized and
+is thus not necessarily present in other systems.
+(The size of a system page can be determined by calling
+.Fn sysconf _SC_PAGESIZE .
+See
+.Xr sysconf 3
+for details.)
+.Pp
 The
 .Fn brk
 function sets the break to



Home | Main Index | Thread Index | Old Index