comparison src/free-hook.c @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents 3ecd8885ac67
children 1ccc32a20af4
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
129 #ifdef UNMAPPED_FREE 129 #ifdef UNMAPPED_FREE
130 unsigned long rounded_up_size; 130 unsigned long rounded_up_size;
131 #endif 131 #endif
132 132
133 EMACS_INT present = (EMACS_INT) gethash (ptr, pointer_table, 133 EMACS_INT present = (EMACS_INT) gethash (ptr, pointer_table,
134 (CONST void **) &size); 134 (const void **) &size);
135 135
136 if (!present) 136 if (!present)
137 { 137 {
138 /* This can only happen if you try to free something that didn't 138 /* This can only happen if you try to free something that didn't
139 come from malloc */ 139 come from malloc */
255 EMACS_INT present; 255 EMACS_INT present;
256 size_t old_size; 256 size_t old_size;
257 void *result = malloc (size); 257 void *result = malloc (size);
258 258
259 if (!ptr) return result; 259 if (!ptr) return result;
260 present = (EMACS_INT) gethash (ptr, pointer_table, (CONST void **) &old_size); 260 present = (EMACS_INT) gethash (ptr, pointer_table, (const void **) &old_size);
261 if (!present) 261 if (!present)
262 { 262 {
263 /* This can only happen by reallocing a pointer that didn't 263 /* This can only happen by reallocing a pointer that didn't
264 come from malloc. */ 264 come from malloc. */
265 #if !defined(__linux__) 265 #if !defined(__linux__)