summaryrefslogtreecommitdiff
path: root/libiberty/alloca.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2001-09-26 18:45:50 +0000
committerDJ Delorie <dj@delorie.com>2001-09-26 18:45:50 +0000
commit80699cc1158e6902fa7052f15008a7d14011f50c (patch)
tree210ff566d6a01b4c48d8ca94bc1555d5c1ef770b /libiberty/alloca.c
parent08a3fc08804a1e6f4567fbfd0ed64a08b66c98e7 (diff)
downloadbinutils-redhat-80699cc1158e6902fa7052f15008a7d14011f50c.tar.gz
merge from gcc
Diffstat (limited to 'libiberty/alloca.c')
-rw-r--r--libiberty/alloca.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libiberty/alloca.c b/libiberty/alloca.c
index 822c1dc230..9c07e0d481 100644
--- a/libiberty/alloca.c
+++ b/libiberty/alloca.c
@@ -21,6 +21,27 @@
allocating any. It is a good idea to use alloca(0) in
your main control loop, etc. to force garbage collection. */
+/*
+
+@deftypefn Replacement void* alloca (size_t)
+
+This function allocates memory which will be automatically reclaimed
+after the procedure exits. The @libib{} implementation does not free
+the memory immediately but will do so eventually during subsequent
+calls to this function. Memory is allocated using @code{xmalloc} under
+normal circumstances.
+
+The header file @file{alloca-conf.h} can be used in conjunction with the
+GNU Autoconf test @code{AC_FUNC_ALLOCA} to test for and properly make
+available this function. The @code{AC_FUNC_ALLOCA} test requires that
+client code use a block of preprocessor code to be safe (see the Autoconf
+manual for more); this header incorporates that logic and more, including
+the possibility of a GCC builtin function.
+
+@end deftypefn
+
+*/
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif