aallllooccaa() -- General Function (libc)

Dynamically allocate space on the stack
aallllooccaa(_m_e_m_o_r_y)
iinntt _m_e_m_o_r_y;

The function aallllooccaa() allocates  _m_e_m_o_r_y number of bytes  dynamically on the
stack.   The  allocated  memory disappears  automatically  as  soon as  the
program exits from the function within which the memory was allocated.

For example, consider the function:

    foo(some_string)
    char *some_string;
    {
        char *cp;
        . . .
        cp = alloca(strlen(some_string) + 1);
        strcpy(cp, some_string);
        . . .
    }

Here, the call to aallllooccaa()  allocates  enough  space  upon  the  stack  for
ssoommee_ssttrriinngg plus the terminating NUL character.  When function ffoooo()
returns, the allocated memory vanishes.

This routine  is popular  in Berkeley  and GNU circles  because it  is much
faster than mmaalllloocc(), and the programmer does not need to call ffrreeee()    to
de-allocate the memory.

_S_e_e _A_l_s_o
ccaalllloocc(), lliibbcc, mmaalllloocc(), rreeaalllloocc()
