Closed Bug 486303 Opened 16 years ago Closed 16 years ago

GC policy code refactoring

Categories

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

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: lhansen, Assigned: lhansen)

Details

Attachments

(2 obsolete files)

Attached file Complete but tested on MacOS X only (obsolete) —
An effort to refactor the GC policy code so that it is visible and inspectable. As a general rule this refactoring should not change the current policy or behavior at all.
Attachment #370392 - Attachment is obsolete: true
Comment on attachment 370432 [details] [diff] [review] v2, compiles with Xcode and MSVC 32-bit and 64-bit The buildbot is happy...
Attachment #370432 - Attachment is patch: true
Attachment #370432 - Flags: review?(treilly)
Tommy, re that patch, I should add that the code I've submitted here has two minor changes to the accounting of the number of blocks owned by the gc (totalGCPages). In GC::FreeBlock, where - so far as I could tell - accounting of totalGCBlocks wasn't quite right, because even if 'collecting' was true the block was returned to GCHeap. I'm not sure that it would have mattered in most cases. Also, I've gotten rid of heap->Alloc and heap->Free throughout, replacing them with heapAlloc and heapFree. The latter always perform correct accounting. They were used intermittently in the old code, and they were doing accounting, but they were not used consistently so the accounting was probably off. Again, probably in the noise, but anyway that motivates those changes. Finally, the patch is slightly over-elaborate, mostly because I wanted as much clarity as possible. Let me know if it makes you retch. I expect we'll simplify this by and by in any case.
Comment on attachment 370432 [details] [diff] [review] v2, compiles with Xcode and MSVC 32-bit and 64-bit nice!
Attachment #370432 - Flags: review?(treilly) → review+
Comment on attachment 370432 [details] [diff] [review] v2, compiles with Xcode and MSVC 32-bit and 64-bit Pushed as redux changeset 1661:7a3612b64853
Attachment #370432 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Resolved fixed engineering / work item that has been pushed. Setting status to verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: