Skip to content

Commit b88e8ed

Browse files
committed
Attempt to fix Windows Debug CI
1 parent b4d1be3 commit b88e8ed

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/runtime_tests.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <vector>
77

88
// Allocation tracker, to catch memory leaks and double delete
9-
constexpr std::size_t max_allocations = 200'000;
9+
constexpr std::size_t max_allocations = 20'000;
1010
void* allocations[max_allocations];
1111
void* allocations_array[max_allocations];
1212
std::size_t num_allocations = 0u;
@@ -45,6 +45,10 @@ void* allocate(std::size_t size, bool array) {
4545
}
4646

4747
void deallocate(void* p, bool array) {
48+
if (p == nullptr) {
49+
return;
50+
}
51+
4852
if (memory_tracking) {
4953
bool found = false;
5054
void** allocations_type = array ? allocations_array : allocations;

0 commit comments

Comments
 (0)