Further refinements of discussion of when to use/not use alloca().

This commit is contained in:
Michael Kerrisk 2008-01-30 10:16:44 +00:00
parent 25715c9631
commit 0bb9038bea
1 changed files with 11 additions and 1 deletions

View File

@ -72,7 +72,17 @@ Linux uses the GNU version.
The
.BR alloca ()
function is machine- and compiler-dependent.
Its use is discouraged.
For certain applications,
its use can improve efficiency compared to the use of
.BR malloc(3)
plus
.BR free (3).
In certain cases,
it can also simplify memory deallocation in applications that use
.BR longjmp (3)
or
.BR siglongjmp (3).
Otherwise, its use is discouraged.
Because the space allocated by
.BR alloca ()