diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/alloc.c b/src/alloc.c index 3c9b2199e52..ccf4afff9f8 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1161,20 +1161,21 @@ refill_memory_reserve () | |||
| 1161 | #ifndef SYNC_INPUT | 1161 | #ifndef SYNC_INPUT |
| 1162 | 1162 | ||
| 1163 | #ifndef DOUG_LEA_MALLOC | 1163 | #ifndef DOUG_LEA_MALLOC |
| 1164 | extern void * (*__malloc_hook) P_ ((size_t)); | 1164 | extern void * (*__malloc_hook) P_ ((size_t, const void *)); |
| 1165 | extern void * (*__realloc_hook) P_ ((void *, size_t)); | 1165 | extern void * (*__realloc_hook) P_ ((void *, size_t, const void *)); |
| 1166 | extern void (*__free_hook) P_ ((void *)); | 1166 | extern void (*__free_hook) P_ ((void *, const void *)); |
| 1167 | /* Else declared in malloc.h, perhaps with an extra arg. */ | 1167 | /* Else declared in malloc.h, perhaps with an extra arg. */ |
| 1168 | #endif /* DOUG_LEA_MALLOC */ | 1168 | #endif /* DOUG_LEA_MALLOC */ |
| 1169 | static void * (*old_malloc_hook) (); | 1169 | static void * (*old_malloc_hook) P_ ((size_t, const void *)); |
| 1170 | static void * (*old_realloc_hook) (); | 1170 | static void * (*old_realloc_hook) P_ ((void *, size_t, const void*)); |
| 1171 | static void (*old_free_hook) (); | 1171 | static void (*old_free_hook) P_ ((void*, const void*)); |
| 1172 | 1172 | ||
| 1173 | /* This function is used as the hook for free to call. */ | 1173 | /* This function is used as the hook for free to call. */ |
| 1174 | 1174 | ||
| 1175 | static void | 1175 | static void |
| 1176 | emacs_blocked_free (ptr) | 1176 | emacs_blocked_free (ptr, ptr2) |
| 1177 | void *ptr; | 1177 | void *ptr; |
| 1178 | const void *ptr2; | ||
| 1178 | { | 1179 | { |
| 1179 | BLOCK_INPUT_ALLOC; | 1180 | BLOCK_INPUT_ALLOC; |
| 1180 | 1181 | ||
| @@ -1221,8 +1222,9 @@ emacs_blocked_free (ptr) | |||
| 1221 | /* This function is the malloc hook that Emacs uses. */ | 1222 | /* This function is the malloc hook that Emacs uses. */ |
| 1222 | 1223 | ||
| 1223 | static void * | 1224 | static void * |
| 1224 | emacs_blocked_malloc (size) | 1225 | emacs_blocked_malloc (size, ptr) |
| 1225 | size_t size; | 1226 | size_t size; |
| 1227 | const void *ptr; | ||
| 1226 | { | 1228 | { |
| 1227 | void *value; | 1229 | void *value; |
| 1228 | 1230 | ||
| @@ -1268,9 +1270,10 @@ emacs_blocked_malloc (size) | |||
| 1268 | /* This function is the realloc hook that Emacs uses. */ | 1270 | /* This function is the realloc hook that Emacs uses. */ |
| 1269 | 1271 | ||
| 1270 | static void * | 1272 | static void * |
| 1271 | emacs_blocked_realloc (ptr, size) | 1273 | emacs_blocked_realloc (ptr, size, ptr2) |
| 1272 | void *ptr; | 1274 | void *ptr; |
| 1273 | size_t size; | 1275 | size_t size; |
| 1276 | const void *ptr2; | ||
| 1274 | { | 1277 | { |
| 1275 | void *value; | 1278 | void *value; |
| 1276 | 1279 | ||