From 2ba7d1485e6302310c87a69e45333ae94b1f7cc5 Mon Sep 17 00:00:00 2001 From: lixianjing Date: Mon, 15 Jun 2020 18:56:00 +0800 Subject: [PATCH] improve mem --- src/tkc/mem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tkc/mem.c b/src/tkc/mem.c index 6fac8b2c6..e741a70ec 100644 --- a/src/tkc/mem.c +++ b/src/tkc/mem.c @@ -281,6 +281,7 @@ mem_stat_t tk_mem_stat() { return st; } +#ifdef WITH_SDL /*export std malloc*/ void* calloc(size_t count, size_t size) { return tk_calloc_impl(count, size); @@ -297,6 +298,8 @@ void* malloc(size_t size) { void* realloc(void* ptr, size_t size) { return tk_realloc_impl(ptr, size); } +#endif/*WITH_SDL*/ + #endif /*HAS_STD_MALLOC*/ static void* tk_calloc_impl(uint32_t nmemb, uint32_t s) {