summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-08-10 12:37:08 -0700
committerMichael Kerrisk <mtk.manpages@gmail.com>2021-08-31 04:01:01 +0200
commitddc5192f0caaaa79f1d32cd6b729a23c8140989f (patch)
treea54a20004a4fe090838174f4b05f5277b293c399
parentcfc381be29fb7b4f642b8b333882f22628112abe (diff)
malloc_hook.3: Modernize for glibc 2.34
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man3/malloc_hook.313
1 files changed, 10 insertions, 3 deletions
diff --git a/man3/malloc_hook.3 b/man3/malloc_hook.3
index 6d944003b..7b76bbc9b 100644
--- a/man3/malloc_hook.3
+++ b/man3/malloc_hook.3
@@ -11,7 +11,7 @@
.SH NAME
__malloc_hook, __malloc_initialize_hook,
__memalign_hook, __free_hook, __realloc_hook,
-__after_morecore_hook \- malloc debugging variables
+__after_morecore_hook \- malloc debugging variables (DEPRECATED)
.SH SYNOPSIS
.nf
.B "#include <malloc.h>"
@@ -86,11 +86,18 @@ The use of these hook functions is not safe in multithreaded programs,
and they are now deprecated.
From glibc 2.24 onwards, the
.B __malloc_initialize_hook
-variable has been removed from the API.
+variable has been removed from the API,
+and from glibc 2.34 onwards, all
+the hook variables have been removed from the API.
.\" https://bugzilla.redhat.com/show_bug.cgi?id=450187
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=9957
Programmers should instead preempt calls to the relevant functions
-by defining and exporting functions such as "malloc" and "free".
+by defining and exporting
+.BR malloc (),
+.BR free (),
+.BR realloc (),
+and
+.BR calloc ().
.SH EXAMPLES
Here is a short example of how to use these variables.
.PP