summaryrefslogtreecommitdiffstats
path: root/man2/sstk.2
blob: 7a20da9b8bddfdeae6cffb00064d2a4c2f57492b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.\" From the 4.3BSD Architecture Manual - BSD copyright
.TH SSTK 2 2003-11-11 "" "BSD planned"
.SH NAME
sstk \- change stack size
.SH SYNOPSIS
caddr_t sstk(int incr);
.SH DESCRIPTION
(From the 4.3BSD Architecture Manual)
.sp
Each process begins execution with three logical areas of memories
called text, data and stack. The text area is read-only and shared,
while the data and stack areas are private to the process.
Both the data and stack areas may be extended and contracted on
program request. The call
.sp
.in +5
caddr_t addr = sbrk(incr);
.in
.sp
changes the size of the data area by
.I incr
bytes and returns the new end of the data area, while
.sp
.in +5
caddr_t addr = sstk(incr);
.in
.sp
changes the size of the stack area. The stack area is also automatically
extended as needed. On the VAX the text and data areas are adjacent
in the P0 region, while the stack section is in the P1 region, and
grows downward.
.SH NOTE
This call is not supported in 4.3BSD or 4.4BSD or glibc or Linux or any
other known Unix-like system. Some systems have a routine of this name
that returns ENOSYS.
.SH "SEE ALSO"
.BR sbrk (2)