home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / compat / stdlib / alloca.txh < prev    next >
Encoding:
Text File  |  1995-07-23  |  487 b   |  27 lines

  1. @node alloca, memory
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <stdlib.h>
  6.  
  7. void *alloca(size_t _size)
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. Allocate memory that will be automatically released when the current
  13. procedure exits.  Note that, when compiling with gcc, alloca is a
  14. built-in function and not a library call.
  15.  
  16. @subheading Return Value
  17.  
  18. A pointer to the memory, else NULL.
  19.  
  20. @subheading Example
  21.  
  22. @example
  23. q = alloca(strlen(x)+1);
  24. strcpy(q, x);
  25. @end example
  26.  
  27.