X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5826c2dea3a9a0d929eed630fb0c84c41015bc3d..4a69abcc786d029bd2962537f767d12a0f808d11:/src/xbt/xbt_main.cpp diff --git a/src/xbt/xbt_main.cpp b/src/xbt/xbt_main.cpp index 945304e143..f04241769a 100644 --- a/src/xbt/xbt_main.cpp +++ b/src/xbt/xbt_main.cpp @@ -1,14 +1,13 @@ /* module handling */ -/* Copyright (c) 2006-2014. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2006-2017. 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. */ #define XBT_LOG_LOCALLY_DEFINE_XBT_CHANNEL /* MSVC don't want it to be declared extern in headers and local here */ - +#include #include "xbt/misc.h" #include "simgrid_config.h" #include "xbt/sysdep.h" @@ -88,20 +87,14 @@ static void xbt_preinit(void) { #error Cannot get page size. #endif - xbt_pagebits = 0; - int x = xbt_pagesize; - while(x >>= 1) { - ++xbt_pagebits; - } + xbt_pagebits = log2(xbt_pagesize); #ifdef _TWO_DIGIT_EXPONENT /* Even printf behaves differently on Windows... */ _set_output_format(_TWO_DIGIT_EXPONENT); #endif xbt_log_preinit(); - xbt_backtrace_preinit(); xbt_os_thread_mod_preinit(); - xbt_fifo_preinit(); xbt_dict_preinit(); srand(seed); @@ -115,8 +108,6 @@ static void xbt_postexit(void) { if(!_sg_do_clean_atexit) return; xbt_initialized--; - xbt_backtrace_postexit(); - xbt_fifo_postexit(); xbt_dict_postexit(); xbt_os_thread_mod_postexit(); xbt_dynar_free(&xbt_cmdline);