From 98bc1b61015ed853b51754e81ca5a555a2c9367f Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 20 Apr 2023 01:55:44 +0000 Subject: [PATCH] change write opt --- include/os/osMemory.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/os/osMemory.h b/include/os/osMemory.h index ac1f8b6d40..ee21d28fb8 100644 --- a/include/os/osMemory.h +++ b/include/os/osMemory.h @@ -24,16 +24,16 @@ extern "C" { // When you want to use this feature, you should find or add the same function in the following sectio #if !defined(WINDOWS) -// #ifndef ALLOW_FORBID_FUNC -// #define malloc MALLOC_FUNC_TAOS_FORBID -// #define calloc CALLOC_FUNC_TAOS_FORBID -// #define realloc REALLOC_FUNC_TAOS_FORBID -// #define free FREE_FUNC_TAOS_FORBID +#ifndef ALLOW_FORBID_FUNC +#define malloc MALLOC_FUNC_TAOS_FORBID +#define calloc CALLOC_FUNC_TAOS_FORBID +#define realloc REALLOC_FUNC_TAOS_FORBID +#define free FREE_FUNC_TAOS_FORBID #ifdef strdup #undef strdup #define strdup STRDUP_FUNC_TAOS_FORBID #endif -// #endif // ifndef ALLOW_FORBID_FUNC +#endif // ifndef ALLOW_FORBID_FUNC #endif // if !defined(WINDOWS) // // #define taosMemoryFree malloc