diff --git a/source/common/utility/m_alloc.cpp b/source/common/utility/m_alloc.cpp index 3b7e12f43..454fde6d1 100644 --- a/source/common/utility/m_alloc.cpp +++ b/source/common/utility/m_alloc.cpp @@ -77,6 +77,14 @@ void *M_Realloc(void *memblock, size_t size) GC::ReportRealloc(oldsize, _msize(block)); return block; } + +void* M_Calloc(size_t v1, size_t v2) +{ + auto p = M_Malloc(v1 * v2); + memset(p, 0, v1 * v2); + return p; +} + #else void *M_Malloc(size_t size) { diff --git a/source/common/utility/m_alloc.h b/source/common/utility/m_alloc.h index 471d42fae..5f80584d6 100644 --- a/source/common/utility/m_alloc.h +++ b/source/common/utility/m_alloc.h @@ -72,12 +72,7 @@ inline void* M_Calloc_Dbg(size_t v1, size_t v2, const char* file, int lineno) #else void *M_Malloc (size_t size); void *M_Realloc (void *memblock, size_t size); -inline void* M_Calloc(size_t v1, size_t v2) -{ - auto p = M_Malloc(v1 * v2); - memset(p, 0, v1 * v2); - return p; -} +void* M_Calloc(size_t v1, size_t v2); #endif