From 1c55e2f389d6018784ba29d37e22bbb0d8dd99c6 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Wed, 11 Mar 2015 10:04:55 -0700 Subject: [PATCH] fix(util/memory): memory allocation problem when using clang++ 3.5 on Ubuntu 14.04 --- src/util/memory.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util/memory.cpp b/src/util/memory.cpp index 4f5d693dd..d569d2135 100644 --- a/src/util/memory.cpp +++ b/src/util/memory.cpp @@ -68,8 +68,8 @@ void free(void * ptr) { namespace lean { inline size_t malloc_size(void * ptr) { return malloc_usable_size(ptr); } inline void * malloc_core(size_t sz) { return ::malloc(sz); } -inline void * realloc_core(void * ptr, size_t sz) { return realloc(ptr, sz); } -inline void free_core(void * ptr) { free(ptr); } +inline void * realloc_core(void * ptr, size_t sz) { return ::realloc(ptr, sz); } +inline void free_core(void * ptr) { ::free(ptr); } } // REMARK: We commented the following piece of code because tc_malloc_size is hanging @@ -86,16 +86,16 @@ inline void free_core(void * ptr) { free(ptr); } namespace lean { inline size_t malloc_size(void * ptr) { return ::malloc_size(ptr); } inline void * malloc_core(size_t sz) { return ::malloc(sz); } -inline void * realloc_core(void * ptr, size_t sz) { return realloc(ptr, sz); } -inline void free_core(void * ptr) { free(ptr); } +inline void * realloc_core(void * ptr, size_t sz) { return ::realloc(ptr, sz); } +inline void free_core(void * ptr) { ::free(ptr); } } #elif defined(HAS_MSIZE) #include // NOLINT namespace lean { inline size_t malloc_size(void * ptr) { return _msize(ptr); } inline void * malloc_core(size_t sz) { return ::malloc(sz); } -inline void * realloc_core(void * ptr, size_t sz) { return realloc(ptr, sz); } -inline void free_core(void * ptr) { free(ptr); } +inline void * realloc_core(void * ptr, size_t sz) { return ::realloc(ptr, sz); } +inline void free_core(void * ptr) { ::free(ptr); } } #else namespace lean {