www.delorie.com/djgpp/doc/libc/libc_44.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

alloca

Syntax

 
#include <stdlib.h>

void *alloca(size_t _size)

Description

Allocate memory that will be automatically released when the current procedure exits. Note that, when compiling with gcc, alloca is a built-in function and not a library call.

Return Value

A pointer to the memory, else NULL.

Portability

ANSI/ISO C No
POSIX No

Example

 
q = alloca(strlen(x)+1);
strcpy(q, x);


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004