xref: /csrg-svn/lib/libc/stdlib/alloca.3 (revision 48913)
1*48913Scael.\" Copyright (c) 1980, 1991 Regents of the University of California.
2*48913Scael.\" All rights reserved.
3*48913Scael.\"
4*48913Scael.\" %sccs.include.redist.man%
5*48913Scael.\"
6*48913Scael.\"     @(#)alloca.3	5.1 (Berkeley) 05/02/91
7*48913Scael.\"
8*48913Scael.Dd
9*48913Scael.Dt ALLOCA 3
10*48913Scael.Os BSD 4
11*48913Scael.Sh NAME
12*48913Scael.Nm alloca
13*48913Scael.Nd memory allocator
14*48913Scael.Sh SYNOPSIS
15*48913Scael.Fd #include <stdlib.h>
16*48913Scael.Ft void *
17*48913Scael.Fn alloca "size_t size"
18*48913Scael.Sh DESCRIPTION
19*48913ScaelThe
20*48913Scael.Fn alloca
21*48913Scaelfunction
22*48913Scaelallocates
23*48913Scael.Fa size
24*48913Scaelbytes of space in the stack frame of the caller.
25*48913ScaelThis temporary space is automatically freed on
26*48913Scaelreturn.
27*48913Scael.Sh RETURN VALUES
28*48913ScaelThe
29*48913Scael.Fn alloca
30*48913Scaelfunction returns a pointer to the beginning of the allocated space.
31*48913ScaelIf the allocation failed, a
32*48913Scael.Dv NULL
33*48913Scaelpointer is returned.
34*48913Scael.Sh SEE ALSO
35*48913Scael.Xr brk 2 ,
36*48913Scael.Xr pagesize 2
37*48913Scael.Xr calloc 3 ,
38*48913Scael.Xr malloc 3 ,
39*48913Scael.Xr realloc 3 ,
40*48913Scael.Sh BUGS
41*48913ScaelThe
42*48913Scael.Fn alloca
43*48913Scaelfunction
44*48913Scaelis machine dependent; its use is discouraged.
45*48913Scael.\" .Sh HISTORY
46*48913Scael.\" The
47*48913Scael.\" .Fn alloca
48*48913Scael.\" function appeared in
49*48913Scael.\" .Bx ?? .
50*48913Scael.\" The function appeared in 32v, pwb and pwb.2 and in 3bsd 4bsd
51*48913Scael.\" The first man page (or link to a man page that I can find at the
52*48913Scael.\" moment is 4.3...
53