Unix and Linux Discussions Tagged with break |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
3 |
2,856 |
What is on Your Mind? |
|
|
|
33 |
36,655 |
Solaris |
|
|
|
11 |
2,428 |
Shell Programming and Scripting |
|
|
|
1 |
1,201 |
Shell Programming and Scripting |
|
|
|
7 |
13,302 |
Shell Programming and Scripting |
|
|
|
14 |
29,135 |
Shell Programming and Scripting |
|
|
|
3 |
7,401 |
Solaris |
|
|
|
8 |
3,788 |
Shell Programming and Scripting |
|
|
|
7 |
49,553 |
Shell Programming and Scripting |
|
|
|
0 |
1,330 |
UNIX and Linux RSS News |
|
|
|
1 |
2,332 |
Shell Programming and Scripting |
|
|
|
2 |
13,326 |
Shell Programming and Scripting |
|
|
|
2 |
5,489 |
Shell Programming and Scripting |
|
|
|
2 |
2,365 |
AIX |
|
|
|
7 |
87,291 |
Solaris |
|
|
|
0 |
1,299 |
UNIX and Linux RSS News |
|
|
|
1 |
15,544 |
Shell Programming and Scripting |
|
|
|
1 |
5,987 |
Shell Programming and Scripting |
|
|
|
0 |
1,251 |
Software Releases - RSS News |
|
|
|
1 |
2,670 |
IP Networking |
|
|
|
2 |
2,906 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
18,535 |
Shell Programming and Scripting |
|
|
|
7 |
9,587 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
7,038 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,631 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
8,585 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
12,667 |
Cybersecurity |
|
|
|
4 |
15,296 |
Programming |
|
|
|
1 |
4,348 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,302 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,215 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
32,348 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,932 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
18,664 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
5,937 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
9,992 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,358 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,476 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
5,921 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,566 |
UNIX for Dummies Questions & Answers |
BRK(2) System Calls Manual 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 program (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 program'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 highest 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 regis-
ters 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)