Closed Bug 566843 Opened 14 years ago Closed 6 years ago

GCHeap free list handling appears imprecise

Categories

(Tamarin Graveyard :: Garbage Collection (mmGC), defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Q1 12 - Brannan

People

(Reporter: lhansen, Unassigned)

References

Details

(Whiteboard: has-patch)

Attachments

(2 files)

It's not clear that the number of free lists computed is correct (relative to the comments in the file); it should be one more. This is compensated for in GetFreeListIndex apparently, but it need not be so. Also, there are further invariants on the free lists that should definitely be asserted in CheckFreeLists. Attaching a patch with some preliminary work on tamarin-redux.
Total freelists are coming to a count of 31. So the indexes vary from 0..... 15, 16........ 29, 30 The comment in the code above the kFreeListCompression definition is not holding correct as the first bin (freelist with index 16) will hold for 7 sizes (17..... 23). Also, the assert in GetFreeListIndex() : GCAssert(v > 15 && v < kHugeThreshold); doesn't look correct to me. So either this is not right or my understanding is cheating on me. It should be : GCAssert(v > (kUniqueThreashold-1) && v < kNumFreeLists); ?
Forgot to mention: the assert in the above comment is added in the preliminary patch. Its not currently in the code.
There is one more inconsistency I see with the new assert conditions added to the CheckFreeLists. Since the condition that each bin from list index 16 will be the bin for 8 distinct sizes is not true for the first bin, the minsize calculated in the conditions below will not be correct. minsize = kUniqueThreshold + (i - kUniqueThreshold)*kFreeListCompression; 1363 maxsize = kUniqueThreshold + (i - kUniqueThreshold)*kFreeListCompression + (kFreeListCompression - 1); One possible things would be to let every intermediate bin(freelist) get 8 distinct sizes and consider the last free list for (size > kHugeThreshold) rather than (size >= kHugeThreshold)?
I am not asking review for this patch rightnow. This is more to put all in code what I had talked in the bug notes. Further discussion might lead to more modifications and a cleaner patch probably.
Flags: flashplayer-bug+
Whiteboard: has-patch
Priority: P3 → P4
Priority: P4 → P2
Target Milestone: Q3 11 - Serrano → Q4 11 - Anza
Target Milestone: Q4 11 - Anza → Q1 12 - Brannan
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: