X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/76936ddebd0a514a3259454d475b254ce40947b3..04eb21634ce9041eaf00274eec16e20dbf5f70d0:/src/xbt/mmalloc/mrealloc.c diff --git a/src/xbt/mmalloc/mrealloc.c b/src/xbt/mmalloc/mrealloc.c index 82ab8768df..0e03a922e2 100644 --- a/src/xbt/mmalloc/mrealloc.c +++ b/src/xbt/mmalloc/mrealloc.c @@ -55,10 +55,11 @@ void *mrealloc(xbt_mheap_t mdp, void *ptr, size_t size) switch (type) { case 0: /* Maybe reallocate a large block to a small fragment. */ - if (size <= BLOCKSIZE / 2) { - //printf("(%s) alloc large block...",xbt_thread_self_name()); + + if (size <= BLOCKSIZE / 2) { // Full block -> Fragment; no need to optimize for time + result = mmalloc(mdp, size); - if (result != NULL) { + if (result != NULL) { // useless (mmalloc never returns NULL), but harmless memcpy(result, ptr, size); mfree(mdp, ptr); return (result);