*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: brk | Section: 2 | Source: UNIX v10 | File: brk.2
BRK(2) System Calls Manual BRK(2) NAME brk, sbrk - change core allocation SYNOPSIS int brk(addr) char *addr; char *sbrk(incr) DESCRIPTION Brk sets the system's idea of the lowest location not used by the pro- gram (called the break) to addr rounded up to the next multiple of 1024 bytes. Locations not less than addr and below the stack pointer may cause a memory violation if accessed. In the alternate function sbrk, incr more bytes are added to the pro- gram's data space and a pointer to the start of the new area is re- turned. Rounding occurs as with brk, but a nominal break is remem- bered, so rounding does not accumulate. When a program begins execution via exec the break is set at the high- est location defined by the program and data storage areas. Ordinar- ily, therefore, only programs with growing data areas need to use brk. The error return from sbrk is (char *)-1. SEE ALSO exec(2), end(3), malloc(3) DIAGNOSTICS ENOMEM BRK(2)

Navigation Options