Skip to content

Commit

Permalink
Bug 719315: Free unused chunks. (r=luke, a=akeybl)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Leary committed Jan 19, 2012
1 parent c32414b commit e185ad0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/src/ds/LifoAlloc.cpp
Expand Up @@ -143,8 +143,12 @@ LifoAlloc::freeUnused()
}

/* Free all chunks after |latest|. */
for (BumpChunk *victim = latest->next(); victim; victim = victim->next())
BumpChunk *it = latest->next();
while (it) {
BumpChunk *victim = it;
it = it->next();
BumpChunk::delete_(victim);
}

latest->setNext(NULL);
}
Expand Down

0 comments on commit e185ad0

Please sign in to comment.