refactor C++ STL allocator definitions (pr #651)

This commit is contained in:
Daan Leijen 2022-11-27 13:00:15 -08:00
parent 4295b9cc5f
commit c1299484de
2 changed files with 30 additions and 34 deletions

View file

@ -181,7 +181,7 @@ static void strdup_test() {
// Issue #202
static void heap_no_delete_worker() {
mi_heap_t* heap = mi_heap_new();
void* q = mi_heap_malloc(heap, 1024);
void* q = mi_heap_malloc(heap, 1024); (void)(q);
// mi_heap_delete(heap); // uncomment to prevent assertion
}
@ -245,7 +245,7 @@ static void heap_thread_free_huge_worker() {
static void heap_thread_free_huge() {
for (int i = 0; i < 10; i++) {
shared_p = mi_malloc(1024 * 1024 * 1024);
auto t1 = std::thread(heap_thread_free_large_worker);
auto t1 = std::thread(heap_thread_free_huge_worker);
t1.join();
}
}