aboutsummaryrefslogtreecommitdiff
path: root/src/common.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-01-29 17:32:54 +0000
committergingerBill <bill@gingerbill.org>2024-01-29 17:32:54 +0000
commita967d4fa0f0b7d9514567687b9260fcf77cc6008 (patch)
tree5ba00578583ec0d987215db37017a29ace2c9cac /src/common.cpp
parentf0a7f1812f0884348f03f56bac7560bbb6eefbf8 (diff)
Use `mimalloc` on Windows as a replacement for `HeapAlloc`
Diffstat (limited to 'src/common.cpp')
-rw-r--r--src/common.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/common.cpp b/src/common.cpp
index 90632def3..271bb2b90 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -1,3 +1,11 @@
+#define GB_WINDOWS_H_INCLUDED
+#include "gb/gb.h"
+
+#if defined(GB_SYSTEM_WINDOWS)
+#include "mimalloc/mimalloc-new-delete.h"
+#include "mimalloc/mimalloc-override.h"
+#endif
+
#if defined(GB_SYSTEM_UNIX)
// Required for intrinsics on GCC
#include <xmmintrin.h>
@@ -14,7 +22,6 @@
#undef NOMINMAX
#endif
-#define GB_WINDOWS_H_INCLUDED
#define GB_IMPLEMENTATION
#include "gb/gb.h"