mm_diff.c uses TLS.
# teshsuite/xbt
ADD_TEST(xbt-log-large ${TESH_COMMAND} ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/log_large_test.tesh)
ADD_TEST(xbt-log-parallel ${TESH_COMMAND} ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/parallel_log_crashtest.tesh)
- IF(HAVE_MMAP)
+ IF(HAVE_MMALLOC)
IF(${ARCH_32_BITS})
ADD_TEST(xbt-mmalloc-32 ${TESH_COMMAND} ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/mmalloc_32.tesh)
ELSE()
message(STATUS "Warning: MMAP is thought as non functional on this architecture (${CMAKE_SYSTEM})")
ENDIF()
+if(HAVE_MMAP AND HAVE_THREAD_LOCAL_STORAGE)
+ SET(HAVE_MMALLOC 1)
+else()
+ SET(HAVE_MMALLOC 0)
+endif()
+
if(WIN32) #THOSE FILES ARE FUNCTIONS ARE NOT DETECTED BUT THEY SHOULD...
set(HAVE_UCONTEXT_H 1)
set(HAVE_MAKECONTEXT 1)
SET(MALLOCATOR_IS_WANTED 0)
endif()
-if(enable_model-checking AND HAVE_MMAP)
+if(enable_model-checking AND HAVE_MMALLOC)
SET(HAVE_MC 1)
SET(MMALLOC_WANT_OVERRIDE_LEGACY 1)
include(FindLibunwind)
src/xbt_modinter.h
)
-if(HAVE_MMAP)
+if(HAVE_MMALLOC)
set(XBT_SRC
${XBT_SRC}
src/xbt/mmalloc/mm.c
message("HAVE_VASPRINTF ..............: ${HAVE_VASPRINTF}")
message("HAVE_MMAP ...................: ${HAVE_MMAP}")
message("HAVE_THREAD_LOCAL_STORAGE ...: ${HAVE_THREAD_LOCAL_STORAGE}")
+ message("HAVE_MMALLOC ................: ${HAVE_MMALLOC}")
message("")
message("CONTEXT_THREADS .............: ${CONTEXT_THREADS}")
message("CONTEXT_UCONTEXT ............: ${CONTEXT_UCONTEXT}")
/* This file is AUTOMATICALLY GENERATED by Cmake. Edit the following
template instead buildtools/Cmake/src/internal_config.h.in */
-/* Copyright (c) 2004-2013. The SimGrid Team.
+/* Copyright (c) 2004-2014. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
/* Define to 1 if you have the <execinfo.h> header file. */
#cmakedefine HAVE_EXECINFO_H @HAVE_EXECINFO_H@
-/* Define to 1 if you have the `mmap' function. */
-#cmakedefine HAVE_MMAP @HAVE_MMAP@
+/* Define to 1 if mmalloc is compiled in. */
+#cmakedefine HAVE_MMALLOC @HAVE_MMALLOC@
/* Define to 1 if you have the `getdtablesize' function. */
#cmakedefine HAVE_GETDTABLESIZE @HAVE_GETDTABLESIZE@
/* simgrid_config.h - Results of the configure made visible to user code */
-/* Copyright (c) 2009-2013. The SimGrid Team.
+/* Copyright (c) 2009-2014. The SimGrid Team.
All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#endif
-/* Define to 1 if you have the `mmap' function. */
-#cmakedefine HAVE_MMAP @HAVE_MMAP@
+/* Define to 1 if mmalloc is compiled in. */
+#cmakedefine HAVE_MMALLOC @HAVE_MMALLOC@
/* Get the config */
#undef SIMGRID_NEED_ASPRINTF
XBT_LOG_CONNECT(xbt);
XBT_LOG_CONNECT(graphxml_parse);
XBT_LOG_CONNECT(log);
-#if HAVE_MMAP
+#if HAVE_MMALLOC
XBT_LOG_CONNECT(mm_diff);
#endif
XBT_LOG_CONNECT(module);
/* module handling */
-/* Copyright (c) 2006-2013. The SimGrid Team.
+/* Copyright (c) 2006-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. */
#include "xbt/misc.h"
-#include "simgrid_config.h" /*HAVE_MMAP _XBT_WIN32 */
-#include "internal_config.h" /* MMALLOC_WANT_OVERRIDE_LEGACY */
+#include "simgrid_config.h" /* _XBT_WIN32 */
+#include "internal_config.h" /* MMALLOC_WANT_OVERRIDE_LEGACY */
#include "xbt/sysdep.h"
#include "xbt/log.h"
add_executable(log_large_test log_large_test.c)
add_executable(parallel_log_crashtest parallel_log_crashtest.c)
-if(HAVE_MMAP)
+if(HAVE_MMALLOC)
add_executable(mmalloc_test mmalloc_test.c)
endif()
add_executable(parmap_test parmap_test.c)
### Add definitions for compile
target_link_libraries(log_large_test simgrid)
target_link_libraries(parallel_log_crashtest simgrid)
-if(HAVE_MMAP)
+if(HAVE_MMALLOC)
target_link_libraries(mmalloc_test simgrid)
endif()
target_link_libraries(parmap_test simgrid)