[PATCH 09/22] malloc_hook.3: SYNOPSIS: Use 'volatile' in prototypes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



glibc uses 'volatile' in __malloc_hook, __realloc_hook,
__memalign_hook, __free_hook, and __after_morecore_hook.
Let's use it here too.

.../glibc$ find * -type f \
  |grep '\.h$' \
  |xargs pcregrep -Mn '(?s)\b__malloc_hook\b.*?;';
malloc/malloc.h:168:
extern void *(*__MALLOC_HOOK_VOLATILE __malloc_hook)(size_t __size,
                                                     const void *)
__MALLOC_DEPRECATED;
.../glibc$ find * -type f \
  |grep '\.h$' \
  |xargs pcregrep -Mn '(?s)\b__realloc_hook\b.*?;';
malloc/malloc.h:171:
extern void *(*__MALLOC_HOOK_VOLATILE __realloc_hook)(void *__ptr,
                                                      size_t __size,
                                                      const void *)
__MALLOC_DEPRECATED;
.../glibc$ find * -type f \
 |grep '\.h$' \
 |xargs pcregrep -Mn '(?s)\b__memalign_hook\b.*?;';
malloc/malloc.h:175:
extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t __alignment,
                                                       size_t __size,
                                                       const void *)
__MALLOC_DEPRECATED;
.../glibc$ find * -type f \
  |grep '\.h$' \
  |xargs pcregrep -Mn '(?s)\b__free_hook\b.*?;';
malloc/malloc.h:165:
extern void (*__MALLOC_HOOK_VOLATILE __free_hook) (void *__ptr,
                                                   const void *)
__MALLOC_DEPRECATED;
.../glibc$ find * -type f \
  |grep '\.h$' \
  |xargs pcregrep -Mn '(?s)\*\w*\s*\b__malloc_initialize_hook\b.*?;';
malloc/malloc-hooks.h:22:
void (*__malloc_initialize_hook) (void);
.../glibc$ find * -type f \
  |grep '\.h$' \
  |xargs pcregrep -Mn '(?s)\*\w*\s*\b__after_morecore_hook\b.*?;';
malloc/malloc.h:179:
extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void)
  __MALLOC_DEPRECATED;
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>
---
 man3/malloc_hook.3 | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/man3/malloc_hook.3 b/man3/malloc_hook.3
index 7f1e35043..74c493c83 100644
--- a/man3/malloc_hook.3
+++ b/man3/malloc_hook.3
@@ -16,19 +16,19 @@ __after_morecore_hook \- malloc debugging variables
 .nf
 .B "#include <malloc.h>"
 .PP
-.BI "void *(*__malloc_hook)(size_t " size ", const void *" caller );
+.BI "void *(*volatile __malloc_hook)(size_t " size ", const void *" caller );
 .PP
-.BI "void *(*__realloc_hook)(void *" ptr ", size_t " size \
+.BI "void *(*volatile __realloc_hook)(void *" ptr ", size_t " size \
 ", const void *" caller );
 .PP
-.BI "void *(*__memalign_hook)(size_t " alignment ", size_t " size ,
+.BI "void *(*volatile __memalign_hook)(size_t " alignment ", size_t " size ,
 .BI "                         const void *" caller );
 .PP
-.BI "void (*__free_hook)(void *" ptr ", const void *" caller );
+.BI "void (*volatile __free_hook)(void *" ptr ", const void *" caller );
 .PP
 .B "void (*__malloc_initialize_hook)(void);"
 .PP
-.B "void (*__after_morecore_hook)(void);"
+.B "void (*volatile __after_morecore_hook)(void);"
 .fi
 .SH DESCRIPTION
 The GNU C library lets you modify the behavior of
-- 
2.30.1.721.g45526154a5




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux