2 .\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH _STACK_GROW 3C "Jul 18, 2002"
8 _stack_grow \- express an intention to extend the stack
14 \fBvoid *\fR\fB_stack_grow\fR(\fBvoid *\fR\fIaddr\fR);
20 The \fB_stack_grow()\fR function indicates to the system that the stack is
21 about to be extended to the address specified by \fIaddr\fR. If extending the
22 stack to this address would violate the stack boundaries as retreived by
23 \fBstack_getbounds\fR(3C), a \fBSIGSEGV\fR is raised.
26 If the disposition of \fBSIGSEGV\fR is \fBSIG_DFL\fR, the process is terminated
27 and a core dump is generated. If the application has installed its own
28 \fBSIGSEGV\fR handler to run on the alternate signal stack, the signal
29 information passed to the handler will be such that a call to
30 \fBstack_violation\fR(3C) with these parameters returns 1.
33 The \fIaddr\fR argument is a biased stack pointer value. See the Solaris 64-bit
37 This function has no effect if the specified address, \fIaddr\fR, is within the
38 bounds of the current stack.
42 If the \fB_stack_grow()\fR function succeeds and does not detect a stack
43 violation, it returns \fIaddr\fR.
47 No errors are defined.
51 The \fB_stack_grow()\fR function does not actually adjust the stack pointer
52 register. The caller is responsible for manipulating the stack pointer register
53 once \fB_stack_grow()\fR returns.
56 The \fB_stack_grow()\fR function is typically invoked by code created by the
57 compilation environment prior to executing code that modifies the stack
58 pointer. It can also be used by hand-written assembly routines to allocate
59 stack-based storage safely.
63 See \fBattributes\fR(5) for descriptions of the following attributes:
71 ATTRIBUTE TYPE ATTRIBUTE VALUE
73 Interface Stability Evolving
75 MT-Level Async-Signal-Safe
81 \fBstack_getbounds\fR(3C), \fBstack_inbounds\fR(3C), \fBstack_violation\fR(3C),
85 Solaris 64-bit Developer's Guide