diff --git a/ompi/mca/mpool/base/base.h b/ompi/mca/mpool/base/base.h index 267c52f857..eaa879d596 100644 --- a/ompi/mca/mpool/base/base.h +++ b/ompi/mca/mpool/base/base.h @@ -28,14 +28,6 @@ #include "opal/mca/mca.h" #include "ompi/mca/mpool/mpool.h" #include "opal/threads/mutex.h" -#ifdef HAVE_MALLOC_H -#include -#endif -#if defined(HAVE_MALLOPT) && defined(M_TRIM_THRESHOLD) && defined(M_MMAP_MAX) -#define MPOOL_BASE_CAN_DISABLE_SBRK 1 -#else -#define MPOOL_BASE_CAN_DISABLE_SBRK 0 -#endif #if defined(c_plusplus) || defined(__cplusplus) extern "C" { diff --git a/ompi/mca/mpool/base/mpool_base_lookup.c b/ompi/mca/mpool/base/mpool_base_lookup.c index f5d593e4b5..80ae1ef0db 100644 --- a/ompi/mca/mpool/base/mpool_base_lookup.c +++ b/ompi/mca/mpool/base/mpool_base_lookup.c @@ -17,10 +17,20 @@ * $HEADER$ */ +#define OMPI_DISABLE_ENABLE_MEM_DEBUG 1 #include "ompi_config.h" #include #include +#ifdef HAVE_MALLOC_H +#include +extern int mca_mpool_base_disable_sbrk; +#endif +#if defined(HAVE_MALLOPT) && defined(M_TRIM_THRESHOLD) && defined(M_MMAP_MAX) +#define MPOOL_BASE_CAN_DISABLE_SBRK 1 +#else +#define MPOOL_BASE_CAN_DISABLE_SBRK 0 +#endif #include "opal/mca/mca.h" #include "opal/mca/base/base.h" @@ -28,11 +38,6 @@ #include "ompi/mca/mpool/base/base.h" #include "mpool_base_mem_cb.h" -#if MPOOL_BASE_CAN_DISABLE_SBRK -#include -extern int mca_mpool_base_disable_sbrk; -#endif /* MPOOL_BASE_CAN_DISABLE_SBRK */ - extern int mca_mpool_base_use_mem_hooks; extern ompi_pointer_array_t mca_mpool_base_mem_cb_array; diff --git a/ompi/mca/mpool/base/mpool_base_open.c b/ompi/mca/mpool/base/mpool_base_open.c index 6b8eca3257..f3a4ff928b 100644 --- a/ompi/mca/mpool/base/mpool_base_open.c +++ b/ompi/mca/mpool/base/mpool_base_open.c @@ -17,9 +17,21 @@ * $HEADER$ */ - +#define OMPI_DISABLE_ENABLE_MEM_DEBUG 1 #include "ompi_config.h" + #include +#ifdef HAVE_UNISTD_H +#include +#endif /* HAVE_UNISTD_H */ +#ifdef HAVE_MALLOC_H +#include +#endif +#if defined(HAVE_MALLOPT) && defined(M_TRIM_THRESHOLD) && defined(M_MMAP_MAX) +#define MPOOL_BASE_CAN_DISABLE_SBRK 1 +#else +#define MPOOL_BASE_CAN_DISABLE_SBRK 0 +#endif #include "opal/mca/mca.h" #include "opal/mca/base/base.h" @@ -27,9 +39,6 @@ #include "ompi/mca/mpool/mpool.h" #include "ompi/mca/mpool/base/base.h" #include "ompi/constants.h" -#ifdef HAVE_UNISTD_H -#include -#endif /* HAVE_UNISTD_H */ /* * The following file was created by configure. It contains extern