X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cdf00e8d160887b870361b73204526ec7722abf5..891407b66c3f9fee27e860a6810f82cba7f82c90:/src/mc/mc_memory.c diff --git a/src/mc/mc_memory.c b/src/mc/mc_memory.c index 64c181cd69..f734ec70ad 100644 --- a/src/mc/mc_memory.c +++ b/src/mc/mc_memory.c @@ -1,4 +1,5 @@ -/* Copyright (c) 2008-2012 Da SimGrid Team. All rights reserved. */ +/* Copyright (c) 2008-2014. The SimGrid Team. + * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -24,12 +25,12 @@ void MC_memory_init() std_heap = mmalloc_get_default_md(); xbt_assert(std_heap != NULL); -#ifdef HAVE_GNU_LD +#if defined HAVE_GNU_LD && !defined MMALLOC_WANT_OVERRIDE_LEGACY /* use the system malloc for the model-checker data */ raw_heap = NULL; #else /* Create the second region a page after the first one ends + safety gap */ - raw_heap = xbt_mheap_new(-1, (char*)(std_heap) + STD_HEAP_SIZE + getpagesize()); + raw_heap = xbt_mheap_new(-1, (char*)(std_heap) + STD_HEAP_SIZE + xbt_pagesize); xbt_assert(raw_heap != NULL); #endif } @@ -38,6 +39,9 @@ void MC_memory_init() #include "xbt_modinter.h" void MC_memory_exit(void) { + MC_free_object_info(&mc_binary_info); + MC_free_object_info(&mc_libsimgrid_info); + if (raw_heap) xbt_mheap_destroy(raw_heap); }