mirror of https://github.com/mkerrisk/man-pages
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:
parent
c9a35b01a1
commit
49d83458f3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue