Unix |
Unix v6 |
|
![]() |
break(2) |
![]() |
break, brk, sbrk change core allocation (break = 17.)
sys break; addr char *brk(addr) char *sbrk(incr) sets
the system’s idea of the lowest location not used by
the program (called the break) to (rounded up to the next
multiple of 64 bytes). Locations not less than and below the
stack pointer are not in the address space and will thus
cause a memory violation if accessed. From C, will set the
break to The old break is returned. In the alternate entry
more bytes are added to the program’s data space and a
pointer to the start of the new area is returned. When a
program begins execution via the break is set at the highest
location defined by the program and data storage areas.
Ordinarily, therefore, only programs with growing data areas
need to use exec (II), alloc (III), end (III) The c-bit is
set if the program requests more memory than the system
limit or if more than 8 segmentation registers would be
required to implement the break. From C, 1 is returned for
these errors. Setting the break in the range 0177700 to
0177777 is the same as setting it to zero.
![]() |
break(2) | ![]() |