Closed
Bug 659317
Opened 14 years ago
Closed 6 years ago
Eager freeing of blocks wastes work
Categories
(Tamarin Graveyard :: Garbage Collection (mmGC), defect)
Tamarin Graveyard
Garbage Collection (mmGC)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: lhansen, Unassigned)
Details
During the finalization pass and during lazy sweeping a block found to contain all free objects is eagerly returned to GCHeap. If we consider a program that's in a steady state (or approximately so), the act of freeing eagerly wastes work in several ways:
- work spent maintaining the block invariants is wasted
- work spent to put items on the free list during RC freeing or sweeping
is wasted
- work spent zeroing RCObjects is wasted because GCHeap may zero the memory
before it's given to the allocator
- obtaining a fresh block and reinitializing it to its invariant-upholding
state (exploding it onto the free list) is required
In general it would be better for each allocator to hold onto blocks until they are needed elsewhere, at which point the block is at least being given up for a good reason.
Reporter | ||
Comment 1•14 years ago
|
||
Also wastes:
- work spent zeroing non-RCObjects in GCAlloc::Free, again because GCHeap may
zero the memory before it's given back to the allocator.
Reporter | ||
Comment 2•14 years ago
|
||
This ties in with another theme. We want to move some accounting off the hot path of the allocator (GCAlloc::Alloc and GCAlloc::Free), and we can do that if we can ensure that one allocator cannot hold onto an unbounded amount of memory on its quick list and thus force other allocators to go to GCHeap for more storage when there is storage available. If allocators free blocks lazily instead of eagerly, and look for free blocks in other allocators when they need more (thus forcing coalescing of quick lists in those other allocators), then we may be able to delay most accounting until a query for free memory comes in from another allocator, and what are now per-alloc or per-free tests may become per-block or per-coalesce tests. (This is all speculative.)
Reporter | ||
Comment 3•14 years ago
|
||
On bug #657949 it is observed that lazy sweeping in one allocator is not triggered by the need for memory in another allocator, and that this impacts memory dynamics.
Flags: flashplayer-qrb+
Flags: flashplayer-injection-
Flags: flashplayer-bug-
Comment 4•6 years ago
|
||
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Comment 5•6 years ago
|
||
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in
before you can comment on or make changes to this bug.
Description
•