emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master dd951c0: Port new hybrid malloc to FreeBSD


From: Paul Eggert
Subject: [Emacs-diffs] master dd951c0: Port new hybrid malloc to FreeBSD
Date: Sun, 31 Jan 2016 17:51:27 +0000

branch: master
commit dd951c009a28857c14ae6f0d32f9e8fc042f54a4
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Port new hybrid malloc to FreeBSD
    
    Problem reported by Wolfgang Jenkner in: http://bugs.gnu.org/22086#118
    * src/gmalloc.c (__malloc_initialize_hook, __after_morecore_hook)
    (__morecore) [HYBRID_MALLOC]: Define in this case too.
---
 src/gmalloc.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/gmalloc.c b/src/gmalloc.c
index 282216a..0b76aee 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -321,6 +321,13 @@ License along with this library.  If not, see 
<http://www.gnu.org/licenses/>.
 /* Debugging hook for 'malloc'.  */
 static void *(*__MALLOC_HOOK_VOLATILE gmalloc_hook) (size_t);
 
+/* Replacements for traditional glibc malloc hooks, for platforms that
+   do not already have these hooks.  Platforms with these hooks all
+   used relaxed ref/def, so it is OK to define them here too.  */
+void (*__MALLOC_HOOK_VOLATILE __malloc_initialize_hook) (void);
+void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void);
+void *(*__morecore) (ptrdiff_t);
+
 #ifndef HYBRID_MALLOC
 
 /* Pointer to the base of the first block.  */
@@ -347,10 +354,6 @@ size_t _bytes_free;
 /* Are you experienced?  */
 int __malloc_initialized;
 
-void (*__MALLOC_HOOK_VOLATILE __malloc_initialize_hook) (void);
-void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void);
-void *(*__morecore) (ptrdiff_t);
-
 #else
 
 static struct list _fraghead[BLOCKLOG];



reply via email to

[Prev in Thread] Current Thread [Next in Thread]