alloca man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



ALLOCA(3C)							    ALLOCA(3C)

NAME
     alloca - allocate dynamic space

SYNOPSIS
     #include <alloca.h>

     void *alloca (unsigned size);

DESCRIPTION
     alloca returns a pointer to size bytes of uninitialized local stack
     space.  Since the space is allocated using a built-in compiler function,
     the allocation is quite fast.  If zero is passed as size, alloca returns
     a valid pointer (unlike some versions of malloc, which consider a zero
     size to be an error).

     The #include <alloca.h> is required.

     Space allocated when a function foo calls alloca is freed automatically
     when foo returns.

     It is an error to call free with a pointer returned by alloca.

     Not all environments have alloca in their libraries, so code using it is
     not necessarily portable.	Reasonably portable public domain versions of
     this function are available from various sources on the Internet and the
     World Wide Web.

SEE ALSO
     malloc(3), calloc(3), free(3), /usr/include/alloca.h

DIAGNOSTICS
     In this implementation alloca cannot fail (though if size makes the
     process too large IRIX may kill the process).  Since alloca always
     returns a valid pointer, no diagnostics are possible.  Portability may be
     enhanced if the function calling alloca tests for a return value of 0 and
     handles 0 as an error.

CAVEATS
     Do not call alloca as an argument to another function, as in
     foo(alloca(20));.	Instead use, for example, cp = alloca(20); foo(cp);.

									Page 1

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net