- Timestamp:
- 2013-09-23T09:51:43Z (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache/xc_malloc.c
r1391 r1392 39 39 { 40 40 if (p) { 41 #ifdef TEST42 41 allocator->avail -= size; 43 # else42 #ifndef TEST 44 43 zend_hash_add(&allocator->shm->blocks, (void *) &p, sizeof(p), (void *) &size, sizeof(size), NULL); 45 44 #endif … … 60 59 static XC_ALLOCATOR_MALLOC(xc_allocator_malloc_malloc) /* {{{ */ 61 60 { 61 if (allocator->avail < size) { 62 return NULL; 63 } 62 64 return xc_add_to_blocks(allocator, malloc(size), size); 63 65 } … … 72 74 static XC_ALLOCATOR_CALLOC(xc_allocator_malloc_calloc) /* {{{ */ 73 75 { 76 if (allocator->avail < size) { 77 return NULL; 78 } 74 79 return xc_add_to_blocks(allocator, calloc(memb, size), size); 75 80 }
Note: See TracChangeset
for help on using the changeset viewer.