Loading...
--- Libc/Libc-1725.40.4/stdlib/FreeBSD/alloca.3
+++ Libc/Libc-763.13/stdlib/FreeBSD/alloca.3
@@ -34,25 +34,25 @@
.Sh NAME
.Nm alloca
.Nd memory allocator
+.Sh LIBRARY
+.Lb libc
.Sh SYNOPSIS
-.In alloca.h
-or
-.br
.In stdlib.h
.Ft void *
.Fn alloca "size_t size"
.Sh DESCRIPTION
The
.Fn alloca
-macro
+function
allocates
.Fa size
bytes of space in the stack frame of the caller.
This temporary space is automatically freed on
return.
.Sh RETURN VALUES
+The
.Fn alloca
-returns a pointer to the beginning of the allocated space.
+function returns a pointer to the beginning of the allocated space.
.Sh SEE ALSO
.Xr brk 2 ,
.Xr calloc 3 ,
@@ -60,20 +60,24 @@
.Xr malloc 3 ,
.Xr realloc 3
.Sh HISTORY
+The
.Fn alloca
-appeared in
+function appeared in
.At 32v .
.\" .Bx ?? .
.\" The function appeared in 32v, pwb and pwb.2 and in 3bsd 4bsd
.\" The first man page (or link to a man page that I can find at the
.\" moment is 4.3...
.Sh BUGS
+The
.Fn alloca
+function
is machine and compiler dependent;
its use is discouraged.
.Pp
+The
.Fn alloca
-is slightly unsafe because it cannot ensure that the pointer
+function is slightly unsafe because it cannot ensure that the pointer
returned points to a valid and usable block of memory.
The allocation made may exceed the bounds of the stack, or even go
further into other objects in memory, and
@@ -82,8 +86,3 @@
Avoid
.Fn alloca
with large unbounded allocations.
-.Pp
-The use of C99 variable-length arrays and
-.Fn alloca
-in the same function will cause the lifetime of alloca's storage to be limited to the block containing the
-.Fn alloca