malloc_hook.3: Warn that these functions are deprecated

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Ivana Varekova 2010-10-19 12:32:26 +02:00 committed by Michael Kerrisk
parent a57970603e
commit d722a8bc9f
1 changed files with 7 additions and 5 deletions

View File

@ -3,11 +3,7 @@
.\" Heavily based on glibc documentation
.\" Polished, added docs, removed glibc doc bug, 2002-07-20, aeb
.\"
.\" FIXME
.\" According to a Fedora downstream patch, malloc hooks are deprecated
.\" https://bugzilla.redhat.com/show_bug.cgi?id=450187
.\" Integrate this upstream?
.TH MALLOC_HOOK 3 2002-07-20 "GNU" "Linux Programmer's Manual"
.TH MALLOC_HOOK 3 2010-10-13 "GNU" "Linux Programmer's Manual"
.SH NAME
__malloc_hook, __malloc_initialize_hook,
__memalign_hook, __free_hook, __realloc_hook,
@ -79,6 +75,12 @@ points at a function that is called each time after
was asked for more memory.
.SH "CONFORMING TO"
These functions are GNU extensions.
.SH NOTES
The use of these hook functions is not safe in multithreaded programs,
and they are now deprecated.
.\" https://bugzilla.redhat.com/show_bug.cgi?id=450187
Programmers should instead preempt calls to the relevant functions
by defining and exporting functions such as "malloc" and "free".
.SH "EXAMPLE"
Here is a short example of how to use these variables.
.sp