mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-24 23:31:33 -07:00
Try later allocation plans if growing the arena fails.
Copied from Perforce Change: 189363 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
5fc8accc63
commit
6aec944f87
1 changed files with 14 additions and 12 deletions
|
|
@ -85,19 +85,21 @@ Res PolicyAlloc(Tract *tractReturn, Arena arena, LocusPref pref,
|
|||
if (arena->class->purgeSpare(arena, size) >= size)
|
||||
res = arena->class->grow(arena, pref, size);
|
||||
}
|
||||
if (res != ResOK)
|
||||
return res;
|
||||
if (zones != ZoneSetEMPTY) {
|
||||
res = ArenaFreeLandAlloc(&tract, arena, zones, pref->high, size, pool);
|
||||
if (res == ResOK)
|
||||
goto found;
|
||||
}
|
||||
if (moreZones != zones) {
|
||||
res = ArenaFreeLandAlloc(&tract, arena, moreZones, pref->high,
|
||||
size, pool);
|
||||
if (res == ResOK)
|
||||
goto found;
|
||||
if (res == ResOK) {
|
||||
if (zones != ZoneSetEMPTY) {
|
||||
res = ArenaFreeLandAlloc(&tract, arena, zones, pref->high, size, pool);
|
||||
if (res == ResOK)
|
||||
goto found;
|
||||
}
|
||||
if (moreZones != zones) {
|
||||
res = ArenaFreeLandAlloc(&tract, arena, moreZones, pref->high,
|
||||
size, pool);
|
||||
if (res == ResOK)
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
/* TODO: Log an event here, since something went wrong, before
|
||||
trying the next plan anyway. */
|
||||
}
|
||||
|
||||
/* Plan D: add every zone that isn't blacklisted. This might mix GC'd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue