]> sourceware.org Git - glibc.git/commitdiff
Mark malloc hook variables as deprecated
authorUlrich Drepper <drepper@gmail.com>
Mon, 30 May 2011 01:10:23 +0000 (21:10 -0400)
committerUlrich Drepper <drepper@gmail.com>
Mon, 30 May 2011 01:10:23 +0000 (21:10 -0400)
ChangeLog
NEWS
malloc/malloc.h

index 5fb62a630b6c4a819e41541f3651016346ea26ca..796646e1c0c4ad1fa6ef1f1f9c99c8eebf62adb0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2011-05-29  Ulrich Drepper  <drepper@gmail.com>
 
+       * malloc/malloc.h: Mark malloc hook variables as deprecated.
+
        [BZ #11781]
        * malloc/malloc.h: Declare malloc hook variables as volatile.
 
diff --git a/NEWS b/NEWS
index f95fcd2beac9c8873bfa20d9fc84f95bb65244c9..a3e4464061209ffc773100d637d70952a7235e28 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -39,6 +39,11 @@ Version 2.14
 
 * New program sotruss to trace calls through PLTs
   Implemented by Ulrich Drepper.
+
+* The malloc hook implementation is marked deprecated and will be removed
+  from the default implementation in the next version.  The design never
+  worked ever since the introduction of threads.  Even programs which do
+  not create threads themselves can use multiple threads created internally.
 \f
 Version 2.13
 
index e8f6068c1f12cdfa21354457c7158b120f5f3f52..3a43f7cfdb1f3d39b48506efeef2fc2419dcacd6 100644 (file)
 
 # ifdef _LIBC
 #  define __MALLOC_HOOK_VOLATILE
+#  define __MALLOC_DEPRECATED
 # else
 #  define __MALLOC_HOOK_VOLATILE __volatile
+#  define __MALLOC_DEPRECATED __attribute_deprecated__
 # endif
 
 #else  /* Not GCC.  */
@@ -48,6 +50,7 @@
 # define __MALLOC_P(args)      args
 # define __MALLOC_PMT(args)    args
 # define __MALLOC_HOOK_VOLATILE
+# define __MALLOC_DEPRECATED __attribute_deprecated__
 
 #endif /* GCC.  */
 
@@ -164,22 +167,27 @@ extern int malloc_set_state (void *__ptr) __THROW;
 /* Called once when malloc is initialized; redefining this variable in
    the application provides the preferred way to set up the hook
    pointers. */
-extern void (*__MALLOC_HOOK_VOLATILE __malloc_initialize_hook) (void);
+extern void (*__MALLOC_HOOK_VOLATILE __malloc_initialize_hook) (void)
+     __MALLOC_DEPRECATED;
 /* Hooks for debugging and user-defined versions. */
 extern void (*__MALLOC_HOOK_VOLATILE __free_hook) (void *__ptr,
-                                                  __const __malloc_ptr_t);
+                                                  __const __malloc_ptr_t)
+     __MALLOC_DEPRECATED;
 extern void *(*__MALLOC_HOOK_VOLATILE __malloc_hook) (size_t __size,
-                                                     __const __malloc_ptr_t);
+                                                     __const __malloc_ptr_t)
+     __MALLOC_DEPRECATED;
 extern void *(*__MALLOC_HOOK_VOLATILE __realloc_hook) (void *__ptr,
                                                       size_t __size,
-                                                      __const __malloc_ptr_t);
+                                                      __const __malloc_ptr_t)
+     __MALLOC_DEPRECATED;
 extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook) (size_t __alignment,
                                                        size_t __size,
-                                                       __const __malloc_ptr_t);
+                                                       __const __malloc_ptr_t)
+     __MALLOC_DEPRECATED;
 extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void);
 
 /* Activate a standard set of debugging hooks. */
-extern void __malloc_check_init (void) __THROW;
+extern void __malloc_check_init (void) __THROW __MALLOC_DEPRECATED;
 
 
 __END_DECLS
This page took 0.054052 seconds and 5 git commands to generate.