alloca.3: Prevent any misunderstanding about when allocated memory is released

Perhaps some people might misunderstand memory allocated by
alloca() to be like other memory allocated on the stack: that when
the allocation (or the pointer to the allocation) goes out of
scope, the memory is freed. Add some text to prevent that
misunderstanding.

Reported-by: Robin Kuzmin <kuzmin.robin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2018-10-14 14:31:32 +02:00
parent c9a35b01a1
commit 49d83458f3
1 changed files with 7 additions and 0 deletions

View File

@ -107,6 +107,13 @@ is jumped over by a call to
or
.BR siglongjmp (3).
.PP
The space allocated by
.BR alloca ()
is
.I not
automatically deallocated if the pointer that refers to it
simply goes out of scope.
.PP
Do not attempt to
.BR free (3)
space allocated by