diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index 29d9c11d70..5ca3489310 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -95,7 +95,7 @@ implicity from libmpi, there are times when the malloc initialize hook in the memory component doesn't work. So we have to do it from here, since any MPI code is going to call MPI_Init... */ -void (*__malloc_initialize_hook) (void) = +OPAL_DECLSPEC void (*__malloc_initialize_hook) (void) = opal_memory_linux_malloc_init_hook; #endif diff --git a/opal/mca/memory/linux/arena.c b/opal/mca/memory/linux/arena.c index e3f7d69d14..ee8d652dd9 100644 --- a/opal/mca/memory/linux/arena.c +++ b/opal/mca/memory/linux/arena.c @@ -462,8 +462,11 @@ ptmalloc_init __MALLOC_P((void)) if(s[0]) mALLOPt(M_CHECK_ACTION, (int)(s[0] - '0')); __malloc_check_init(); } +#if 0 + /* OMPI Change: Don't call the initialize hook; it was us. */ if(__malloc_initialize_hook != NULL) (*__malloc_initialize_hook)(); +#endif __malloc_initialized = 1; } diff --git a/opal/mca/memory/linux/hooks.c b/opal/mca/memory/linux/hooks.c index 2c3f4a24d0..bbed78b13d 100644 --- a/opal/mca/memory/linux/hooks.c +++ b/opal/mca/memory/linux/hooks.c @@ -892,11 +892,6 @@ void opal_memory_linux_hook_pull(bool *want_hooks) -/* OMPI change: This is the symbol to override to make the above - function get fired during malloc initialization time. */ -void (*__malloc_initialize_hook) (void) = - opal_memory_linux_malloc_init_hook; - /* * Local variables: * c-basic-offset: 4