Skip to content

Commit 8840ce9

Browse files
committed
Attempt to fix OSX not able to run leak checks
1 parent 0bdac7c commit 8840ce9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

tests/runtime_tests.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@
66
#include <vector>
77

88
// Allocation tracker, to catch memory leaks and double delete
9-
constexpr std::size_t max_allocations = 20'000;
9+
constexpr std::size_t max_allocations = 200'000;
1010
void* allocations[max_allocations];
1111
void* allocations_array[max_allocations];
1212
std::size_t num_allocations = 0u;
1313
std::size_t double_delete = 0u;
1414
bool memory_tracking = false;
1515
bool force_allocation_failure = false;
1616

17-
#if defined(OUP_PLATFORM_OSX)
18-
// Getting weird errors on MacOS when overriding operator new and delete,
19-
// so disable the memory leak checking for this platform.
20-
# define CHECK_MEMORY_LEAKS 0
21-
#else
22-
# define CHECK_MEMORY_LEAKS 1
23-
#endif
17+
#define CHECK_MEMORY_LEAKS 1
2418

2519
#if defined(CHECK_MEMORY_LEAKS) && CHECK_MEMORY_LEAKS
2620
void* allocate(std::size_t size, bool array) {

0 commit comments

Comments
 (0)