From a6b30c2f53f0eb061dbb06fa8b894991291a6f88 Mon Sep 17 00:00:00 2001 From: navarrop Date: Mon, 14 Jun 2010 14:44:47 +0000 Subject: [PATCH] Add condition before use a mmalloc function. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7859 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/xbt/xbt_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xbt/xbt_main.c b/src/xbt/xbt_main.c index 16d5d75033..47bef26598 100644 --- a/src/xbt/xbt_main.c +++ b/src/xbt/xbt_main.c @@ -79,7 +79,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { #endif static void xbt_preinit(void) { - mmalloc_preinit(); + #ifdef HAVE_MMAP + mmalloc_preinit(); + #endif xbt_log_preinit(); /* Connect our log channels: that must be done manually under windows */ @@ -123,7 +125,9 @@ static void xbt_postexit(void) { xbt_log_postexit(); free(xbt_binary_name); +#ifdef HAVE_MMAP mmalloc_postexit(); +#endif } /** @brief Initialize the xbt mechanisms. */ -- 2.20.1