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:
+3
-3
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user