X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a0fcde6efb589d65005c77e7d64b8634cbe277fc..05736ee0ede974fcf9fb60a13a40c50d62fcc19d:/src/xbt/mmalloc/mmalloc.c?ds=sidebyside diff --git a/src/xbt/mmalloc/mmalloc.c b/src/xbt/mmalloc/mmalloc.c index 4c3223877b..f04b8635d7 100644 --- a/src/xbt/mmalloc/mmalloc.c +++ b/src/xbt/mmalloc/mmalloc.c @@ -1,6 +1,6 @@ /* Memory allocator `malloc'. */ -/* Copyright (c) 2010-2014. The SimGrid Team. +/* Copyright (c) 2010-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -177,13 +177,13 @@ void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size) { void *result; size_t block, blocks, lastblocks, start; - register size_t i; - register size_t log; + size_t i; + size_t log; int it; size_t requested_size = size; // The amount of memory requested by user, for real - /* Work even if the user was stupid enough to ask a ridicullously small block (even 0-length), + /* Work even if the user was stupid enough to ask a ridiculously small block (even 0-length), * ie return a valid block that can be realloced and freed. * glibc malloc does not use this trick but return a constant pointer, but we need to enlist the free fragments later on. */ @@ -266,7 +266,7 @@ void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size) mdp->heapinfo[block].busy_frag.ignore[0] = 0; //xbt_backtrace_no_malloc(mdp->heapinfo[block].busy_frag.bt[0],XBT_BACKTRACE_SIZE); //xbt_libunwind_backtrace(mdp->heapinfo[block].busy_frag.bt[0],XBT_BACKTRACE_SIZE); - + /* update stats */ mdp -> heapstats.chunks_free += (BLOCKSIZE >> log) - 1; mdp -> heapstats.bytes_free += BLOCKSIZE - (1 << log); @@ -359,7 +359,7 @@ void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size) mdp->heapinfo[block].busy_block.busy_size = requested_size; //mdp->heapinfo[block].busy_block.bt_size = xbt_backtrace_no_malloc(mdp->heapinfo[block].busy_block.bt,XBT_BACKTRACE_SIZE); //mdp->heapinfo[block].busy_block.bt_size = xbt_libunwind_backtrace(mdp->heapinfo[block].busy_block.bt,XBT_BACKTRACE_SIZE); - + mdp -> heapstats.chunks_used++; mdp -> heapstats.bytes_used += blocks * BLOCKSIZE; mdp -> heapstats.bytes_free -= blocks * BLOCKSIZE;