diff --git a/src/drivers/include/common.h b/src/drivers/include/common.h index 294ecd3fa..22123e076 100644 --- a/src/drivers/include/common.h +++ b/src/drivers/include/common.h @@ -69,10 +69,17 @@ extern void NCI_Free_fn(void *ptr, const int lineno, const char *func, const char *filename); +#if defined(PNETCDF_DEBUG) || defined(PNC_MALLOC_TRACE) #define NCI_Malloc(a) NCI_Malloc_fn(a,__LINE__,__func__,__FILE__) #define NCI_Calloc(a,b) NCI_Calloc_fn(a,b,__LINE__,__func__,__FILE__) #define NCI_Realloc(a,b) NCI_Realloc_fn(a,b,__LINE__,__func__,__FILE__) #define NCI_Free(a) NCI_Free_fn(a,__LINE__,__func__,__FILE__) +#else +#define NCI_Malloc(a) malloc(a) +#define NCI_Calloc(a,b) calloc(a,b) +#define NCI_Realloc(a,b) realloc(a,b) +#define NCI_Free(a) free(a) +#endif extern int ncmpii_inq_malloc_size(size_t *size);