Changeset 2745 for trunk/src/kmk
- Timestamp:
- Jan 3, 2015, 8:32:00 PM (11 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/hash.c
r2591 r2745 22 22 23 23 24 #define CALLOC(t, n) ((t *) calloc (sizeof (t), (n))) 24 /*#define CALLOC(t, n) ((t *) calloc (sizeof (t), (n)))*/ 25 #define CALLOC(t, n) ((t *) xcalloc (sizeof (t) * (n))) 25 26 #define MALLOC(t, n) ((t *) xmalloc (sizeof (t) * (n))) 26 27 #define REALLOC(o, t, n) ((t *) xrealloc ((o), sizeof (t) * (n))) -
trunk/src/kmk/incdep.c
r2744 r2745 256 256 257 257 #if 0 258 /* memset(malloc(sz),'\0',sz) wrapper.*/258 /* cmalloc wrapper */ 259 259 static void * 260 260 incdep_xcalloc (struct incdep *cur, size_t size) -
trunk/src/kmk/make.h
r2633 r2745 214 214 # ifdef __APPLE__ 215 215 # include <malloc/malloc.h> 216 # define SIZE_OF_HEAP_BLOCK(ptr) malloc_ good_size(ptr)216 # define SIZE_OF_HEAP_BLOCK(ptr) malloc_size(ptr) 217 217 218 218 # elif defined(__linux__) /* glibc */ -
trunk/src/kmk/misc.c
r2591 r2745 455 455 if (result == 0) 456 456 fatal (NILF, _("virtual memory exhausted")); 457 458 #ifdef CONFIG_WITH_MAKE_STATS 459 make_stats_allocations++; 460 if (make_expensive_statistics) 461 make_stats_allocated += SIZE_OF_HEAP_BLOCK (result); 462 else 463 make_stats_allocated += size; 464 #endif 457 465 return result; 458 466 }
Note:
See TracChangeset
for help on using the changeset viewer.