Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sstk(2) — SunOS 0.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpaesize(2)

exec(2)

getrlimit(2)

STK(2)  —  System Interface Manual — System Calls

NAME

stk, sstk − change stack segment size

SYNOPSIS

caddr_t stk(addr)
caddr_t addr;

caddr_t ∗sstk(incr)
int incr;

DESCRIPTION

Stk sets the system’s idea of the lowest stack segment location not used by the program to addr (rounded up to the next multiple of the system’s page size).  Locations less than addr and above the break (the end of the data segment) are not in the address space and will cause a memory violation if accessed. 

In the alternate function sstk, incr more bytes are added to the program’s stack segment and a pointer to the start of the new area is returned. 

The setrlimit(2) system call may be used to determine the maximum permissible size of the stack segment; it will not be possible to expand the stack to be larger than the rlimit_max value returned by “setrlimit(RLIMIT_STACK, rlp)”. 

By default the system expands the stack as required.  This call is useful mainly in conjunction with the map(2) call.

SEE ALSO

getpaesize(2), exec(2), getrlimit(2)

DIAGNOSTICS

Zero is returned if the allocation was successful; −1 if the program requests more memory than the system limit.  Sstk returns −1 if the allocation failed. 

Sun System Release 0.3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026