From 0bb9038bea1bf2abbd80ec37b7cf4d0276eedfba Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 30 Jan 2008 10:16:44 +0000 Subject: [PATCH] Further refinements of discussion of when to use/not use alloca(). --- man3/alloca.3 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/man3/alloca.3 b/man3/alloca.3 index 1093efd1d9..4a88392cba 100644 --- a/man3/alloca.3 +++ b/man3/alloca.3 @@ -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 () -- 2.47.2