- Remove "ompi_config.h" from util/malloc.h. malloc.h is only ever
included by ompi_config_bottom.h, so it's redundant to include ompi_config.h in it. - Add OMPI_DEBUG_ZERO macro for zeroing out memory while debugging so that valgrind (et al.) don't complain about uninitialized memory when we know it's safe. - correct a comment in ompi_config_bottom.h to make it have the correct filename This commit was SVN r3662.
Этот коммит содержится в:
родитель
5cbf975955
Коммит
d39fbd7958
@ -133,7 +133,7 @@ typedef long long bool;
|
||||
/* It is safe to include util/malloc.h here because a) it will only
|
||||
happen when we are building OMPI and therefore have a full OMPI
|
||||
source tree [including headers] available, and b) we guaranteed to
|
||||
*not* to include anything else via mem/malloc.h, so we won't
|
||||
*not* to include anything else via util/malloc.h, so we won't
|
||||
have Cascading Includes Of Death. */
|
||||
#include "util/malloc.h"
|
||||
#if defined(malloc)
|
||||
|
@ -15,7 +15,6 @@
|
||||
#ifndef OMPI_MALLOC_H
|
||||
#define OMPI_MALLOC_H
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
@ -37,6 +36,15 @@
|
||||
#define OMPI_MALLOC_DEBUG_LEVEL 2
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If we're mem debugging, make the OMPI_DEBUG_ZERO resolve to memset
|
||||
*/
|
||||
#if defined(OMPI_ENABLE_MEM_DEBUG) && OMPI_ENABLE_MEM_DEBUG
|
||||
#define OMPI_DEBUG_ZERO(obj) memset(&obj, 0, sizeof(obj))
|
||||
#else
|
||||
#define OMPI_DEBUG_ZERO(obj)
|
||||
#endif
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user