зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1744979 - Update chunk metadata correctly when decommitting empty chunks in response to out of memory r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D133216
This commit is contained in:
Родитель
a4eea925db
Коммит
d42b285136
|
@ -382,7 +382,8 @@ bool TenuredChunk::decommitOneFreePage(GCRuntime* gc, size_t pageIndex,
|
|||
bool ok;
|
||||
{
|
||||
AutoUnlockGC unlock(lock);
|
||||
ok = MarkPagesUnusedSoft(pageAddress(pageIndex), PageSize);
|
||||
ok = !oom::ShouldFailWithOOM() &&
|
||||
MarkPagesUnusedSoft(pageAddress(pageIndex), PageSize);
|
||||
}
|
||||
|
||||
// Mark the page as decommited if successful or restore the original free
|
||||
|
@ -423,6 +424,11 @@ void TenuredChunk::decommitFreeArenasWithoutUnlocking(const AutoLockGC& lock) {
|
|||
}
|
||||
|
||||
decommittedPages[i] = true;
|
||||
for (size_t j = 0; j < ArenasPerPage; ++j) {
|
||||
size_t arenaIndex = i * ArenasPerPage + j;
|
||||
MOZ_ASSERT(freeCommittedArenas[arenaIndex]);
|
||||
freeCommittedArenas[arenaIndex] = false;
|
||||
}
|
||||
info.numArenasFreeCommitted -= ArenasPerPage;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче