X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f29ed6f3e0d0876378d00801428c2d870d9b1ceb..fa02213cffba5b63cb6ee145dda085a4e4401407:/src/mc/mc_global.c diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index 0d58509838..d91af1451a 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -646,11 +646,22 @@ void MC_ignore_init(){ } void MC_ignore(void *address, size_t size){ + MC_SET_RAW_MEM; + mc_ignore_region_t region = NULL; region = xbt_new0(s_mc_ignore_region_t, 1); region->address = address; region->size = size; - xbt_dynar_push(mmalloc_ignore, ®ion); + + unsigned int cursor = 0; + mc_ignore_region_t current_region; + xbt_dynar_foreach(mmalloc_ignore, cursor, current_region){ + if(current_region->address > address) + break; + } + + xbt_dynar_insert_at(mmalloc_ignore, cursor, ®ion); + MC_UNSET_RAW_MEM; }