use region quarantine even if MAP_FIXED call fails

This is a more sensible way of handling an out-of-memory failure in this
edge case. It doesn't matter much in practice.
This commit is contained in:
Daniel Micay 2021-05-12 00:20:03 -04:00
parent 2335f56713
commit 5c974bdf82
2 changed files with 4 additions and 4 deletions

View file

@ -839,10 +839,10 @@ static void regions_quarantine_deallocate_pages(void *p, size_t size, size_t gua
}
if (unlikely(memory_map_fixed(p, size))) {
deallocate_pages(p, size, guard_size);
return;
memory_purge(p, size);
} else {
memory_set_name(p, size, "malloc large quarantine");
}
memory_set_name(p, size, "malloc large quarantine");
struct quarantine_info target =
(struct quarantine_info){(char *)p - guard_size, size + guard_size * 2};