forked from mirrors/gecko-dev
Bug 1888326 - Advance the chunk index after committing pages r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D205971
This commit is contained in:
parent
afd369fcf8
commit
c37988e025
1 changed files with 5 additions and 1 deletions
|
|
@ -2639,7 +2639,8 @@ bool arena_t::SplitRun(arena_run_t* aRun, size_t aSize, bool aLarge,
|
|||
size_t rem_pages = total_pages - need_pages;
|
||||
|
||||
#ifdef MALLOC_DECOMMIT
|
||||
for (size_t i = 0; i < need_pages; i++) {
|
||||
size_t i = 0;
|
||||
while (i < need_pages) {
|
||||
// Commit decommitted pages if necessary. If a decommitted
|
||||
// page is encountered, commit all needed adjacent decommitted
|
||||
// pages in one operation, in order to reduce system call
|
||||
|
|
@ -2685,6 +2686,9 @@ bool arena_t::SplitRun(arena_run_t* aRun, size_t aSize, bool aLarge,
|
|||
}
|
||||
|
||||
mNumFresh += j;
|
||||
i += j;
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue