diff options
| author | Paul Eggert | 2016-01-31 09:50:07 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-01-31 09:51:24 -0800 |
| commit | dd951c009a28857c14ae6f0d32f9e8fc042f54a4 (patch) | |
| tree | 52443f74220e2667c8f8c0174c3e6fcda5e38d12 /src/gmalloc.c | |
| parent | 0496a19a3277db199571af82a5de07d2f5985f0f (diff) | |
| download | emacs-dd951c009a28857c14ae6f0d32f9e8fc042f54a4.tar.gz emacs-dd951c009a28857c14ae6f0d32f9e8fc042f54a4.zip | |
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.
Diffstat (limited to 'src/gmalloc.c')
| -rw-r--r-- | src/gmalloc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gmalloc.c b/src/gmalloc.c index 282216a947b..0b76aeef04d 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/>. | |||
| 321 | /* Debugging hook for 'malloc'. */ | 321 | /* Debugging hook for 'malloc'. */ |
| 322 | static void *(*__MALLOC_HOOK_VOLATILE gmalloc_hook) (size_t); | 322 | static void *(*__MALLOC_HOOK_VOLATILE gmalloc_hook) (size_t); |
| 323 | 323 | ||
| 324 | /* Replacements for traditional glibc malloc hooks, for platforms that | ||
| 325 | do not already have these hooks. Platforms with these hooks all | ||
| 326 | used relaxed ref/def, so it is OK to define them here too. */ | ||
| 327 | void (*__MALLOC_HOOK_VOLATILE __malloc_initialize_hook) (void); | ||
| 328 | void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void); | ||
| 329 | void *(*__morecore) (ptrdiff_t); | ||
| 330 | |||
| 324 | #ifndef HYBRID_MALLOC | 331 | #ifndef HYBRID_MALLOC |
| 325 | 332 | ||
| 326 | /* Pointer to the base of the first block. */ | 333 | /* Pointer to the base of the first block. */ |
| @@ -347,10 +354,6 @@ size_t _bytes_free; | |||
| 347 | /* Are you experienced? */ | 354 | /* Are you experienced? */ |
| 348 | int __malloc_initialized; | 355 | int __malloc_initialized; |
| 349 | 356 | ||
| 350 | void (*__MALLOC_HOOK_VOLATILE __malloc_initialize_hook) (void); | ||
| 351 | void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void); | ||
| 352 | void *(*__morecore) (ptrdiff_t); | ||
| 353 | |||
| 354 | #else | 357 | #else |
| 355 | 358 | ||
| 356 | static struct list _fraghead[BLOCKLOG]; | 359 | static struct list _fraghead[BLOCKLOG]; |