mirror of
https://github.com/microsoft/mimalloc.git
synced 2024-12-30 23:43:39 +08:00
fix mi_collect being called with empty heap (issue #150)
This commit is contained in:
parent
7b63bc4211
commit
e227341f5b
@ -108,9 +108,8 @@ static bool mi_heap_page_never_delayed_free(mi_heap_t* heap, mi_page_queue_t* pq
|
|||||||
|
|
||||||
static void mi_heap_collect_ex(mi_heap_t* heap, mi_collect_t collect)
|
static void mi_heap_collect_ex(mi_heap_t* heap, mi_collect_t collect)
|
||||||
{
|
{
|
||||||
_mi_deferred_free(heap,collect > NORMAL);
|
|
||||||
if (!mi_heap_is_initialized(heap)) return;
|
if (!mi_heap_is_initialized(heap)) return;
|
||||||
|
_mi_deferred_free(heap, collect > NORMAL);
|
||||||
|
|
||||||
// collect (some) abandoned pages
|
// collect (some) abandoned pages
|
||||||
if (collect >= NORMAL && !heap->no_reclaim) {
|
if (collect >= NORMAL && !heap->no_reclaim) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user