-
-
Save MasterDuke17/b8d6531470da743700249a16912c6af4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git src/core/alloc.h src/core/alloc.h | |
index efd562783..2aac07e18 100644 | |
--- src/core/alloc.h | |
+++ src/core/alloc.h | |
@@ -39,7 +39,7 @@ MVM_STATIC_INLINE void * MVM_realloc(void *p, size_t size) { | |
MVM_STATIC_INLINE void * MVM_recalloc(void *p, size_t old_size, size_t size) { | |
#ifdef MVM_USE_MIMALLOC | |
- void *ptr = mi_realloc(p, size); | |
+ void *ptr = mi_rezalloc(p, size); | |
#else | |
void *ptr = realloc(p, size); | |
#endif | |
@@ -48,8 +48,10 @@ MVM_STATIC_INLINE void * MVM_recalloc(void *p, size_t old_size, size_t size) { | |
if (!ptr) | |
MVM_panic_allocation_failed(size); | |
+#ifndef MVM_USE_MIMALLOC | |
if (size > old_size) | |
memset((char *)ptr + old_size, 0, size - old_size); | |
+#endif | |
} | |
return ptr; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment