use the function deprecated attribute if compiling with GCC to get warnings for malloc/free usages. We always want to use our zmalloc/zfree versions for memory usage tracking

This commit is contained in:
antirez
2010-07-27 09:36:42 +02:00
parent 399f2f401c
commit b3aa6d712e
2 changed files with 9 additions and 1 deletions

View File

@ -885,4 +885,12 @@ void publishCommand(redisClient *c);
void watchCommand(redisClient *c);
void unwatchCommand(redisClient *c);
#if defined(__GNUC__)
void *malloc(size_t size) __attribute__ ((deprecated));
void *calloc(size_t count, size_t size) __attribute__ ((deprecated));
void free(void *ptr) __attribute__ ((deprecated));
void *malloc(size_t size) __attribute__ ((deprecated));
void *realloc(void *ptr, size_t size) __attribute__ ((deprecated));
#endif
#endif