aboutsummaryrefslogtreecommitdiff
path: root/manual/memory.texi
diff options
context:
space:
mode:
Diffstat (limited to 'manual/memory.texi')
-rw-r--r--manual/memory.texi16
1 files changed, 8 insertions, 8 deletions
diff --git a/manual/memory.texi b/manual/memory.texi
index dc4621e..46f76c1 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -842,8 +842,8 @@ is left undisturbed.
@end deftypefun
@deftypefun {void *} reallocarray (void *@var{ptr}, size_t @var{nmemb}, size_t @var{size})
-@standards{BSD, malloc.h}
-@standards{BSD, stdlib.h}
+@standards{POSIX.1-2024, malloc.h}
+@standards{POSIX.1-2024, stdlib.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{} @acsfd{} @acsmem{}}}
The @code{reallocarray} function changes the size of the block whose address
@@ -856,8 +856,8 @@ returning a null pointer, and leaving the original block unchanged.
@code{reallocarray} should be used instead of @code{realloc} when the new size
of the allocated block is the result of a multiplication that might overflow.
-@strong{Portability Note:} This function is not part of any standard. It was
-first introduced in OpenBSD 5.6.
+This function was originally derived from OpenBSD 5.6, but was added in
+POSIX.1-2024.
@end deftypefun
Like @code{malloc}, @code{realloc} and @code{reallocarray} may return a null
@@ -3139,7 +3139,7 @@ used to temporarily acquire access to the memory region and relinquish
it again:
@smallexample
- if (key >= 0 && pkey_set (key, 0) < 0)
+ if (key >= 0 && pkey_set (key, PKEY_UNRESTRICTED) < 0)
...; /* Perform error checking (generally fatal). */
/* At this point, the current thread has read-write access to the
memory region. */
@@ -3256,9 +3256,9 @@ not @math{-1}.
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
Change the access restrictions of the current thread for memory pages with
the protection key @var{key} to @var{access_restrictions}. If
-@var{access_restrictions} is zero, no additional access restrictions on top of
-the page protection flags are applied. Otherwise, @var{access_restrictions} is
-a combination of the following flags:
+@var{access_restrictions} is @code{PKEY_UNRESTRICTED} (zero), no additional
+access restrictions on top of the page protection flags are applied. Otherwise,
+@var{access_restrictions} is a combination of the following flags:
@vtable @code
@item PKEY_DISABLE_READ