Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/free.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ static mi_decl_noinline bool mi_abandoned_page_try_reclaim(mi_page_t* page, long

// get our theap
mi_theap_t* const theap = _mi_page_associated_theap_peek(page);
if (theap==NULL || !theap->allow_page_reclaim) return false;
if (theap==NULL || theap->tld==NULL || !theap->allow_page_reclaim) return false;

// todo: cache `is_in_threadpool` and `exclusive_arena` directly in the theap for performance?
// set max_reclaim limit
Expand Down
2 changes: 1 addition & 1 deletion src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ mi_subproc_t* _mi_subproc(void) {
// on such systems we can check for this with the _mi_prim_get_default_theap as those are protected (by being
// stored in a TLS slot for example)
mi_theap_t* theap = _mi_theap_default();
if (theap == NULL) {
if (theap == NULL || theap->tld == NULL) {
return _mi_subproc_main();
}
else {
Expand Down