mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 774104 - Purge allocating arenas when incremental GC starts (r=mccr8)
This commit is contained in:
parent
3c70386ae5
commit
d8a20cf52b
@ -3084,6 +3084,18 @@ BeginMarkPhase(JSRuntime *rt, bool isIncremental)
|
||||
{
|
||||
int64_t currentTime = PRMJ_Now();
|
||||
|
||||
/*
|
||||
* At the end of each incremental slice, we call prepareForIncrementalGC,
|
||||
* which marks objects in all arenas that we're currently allocating
|
||||
* into. This can cause leaks if unreachable objects are in these
|
||||
* arenas. This purge call ensures that we only mark arenas that have had
|
||||
* allocations after the incremental GC started.
|
||||
*/
|
||||
if (isIncremental) {
|
||||
for (GCCompartmentsIter c(rt); !c.done(); c.next())
|
||||
c->arenas.purge();
|
||||
}
|
||||
|
||||
rt->gcIsFull = true;
|
||||
for (CompartmentsIter c(rt); !c.done(); c.next()) {
|
||||
if (!c->isCollecting())
|
||||
|
Loading…
Reference in New Issue
Block a user