mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
refactor C++ STL allocator definitions (pr #651)
This commit is contained in:
parent
4295b9cc5f
commit
c1299484de
2 changed files with 30 additions and 34 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue