brk man page on UNIXv7

Man page or keyword search:  
man Server   300 pages
apropos Keyword Search (all sections)
Output format
UNIXv7 logo
[printable version]

BRK(2)									BRK(2)

NAME
       brk, sbrk, break - change core allocation

SYNOPSIS
       char *brk(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  64
       bytes  on  the PDP11, 256 bytes on the Interdata 8/32, 512 bytes on the
       VAX-11/780).  Locations not less than addr and below the stack  pointer
       are  not in the address space and will thus 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
       returned.

       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
       break.

SEE ALSO
       exec(2), malloc(3), end(3)

DIAGNOSTICS
       Zero  is returned if the break could be set; -1 if the program requests
       more memory than the system limit or if too many segmentation registers
       would be required to implement the break.

BUGS
       Setting the break in the range 0177701 to 0177777 (on the PDP11) is the
       same as setting it to zero.

ASSEMBLER
       (break = 17.)
       sys break; addr

       Break performs the function of brk.  The name of	 the  routine  differs
       from that in C for historical reasons.

									BRK(2)
[top]

List of man pages available for UNIXv7

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net