From: chromatic <[EMAIL PROTECTED]> Date: Sun, 24 Feb 2008 01:55:20 -0800
Some of our memory problems seem to be strange interactions between PObjs allocated out of constant pools, garbage collection, and freezing/thawing PBC (not to mention the interaction of HLLs). Amen! -- particularly the "strange" part. I suspect that Kea-CL has been hard hit lately because it may do things differently. Is there something I should be looking out for? PObjs allocated out of constant pools persist in memory. They get marked (sometimes, but not always), but the garbage collector doesn't sweep the constant pools to recollect them. This is not normally a problem for most constant PObjs. It's mostly fine for strings, and it's fine for PMCs that do not have a special mark() vtable entry. PMCs that *do* need a special mark() are troublesome; they may contain pointers to non-constant PObjs that *do* need live marking, lest they get swept away during the second half of GC. If these constant PObjs don't get marked, there's a problem. Why do constant PMCs ever need to point to non-constant ones? In other words, why are those pointed-to PObjs not also constant? IIUC, this is different from any GC system that I've ever heard of. The whole point of having "pure space" (or whatever you want to call the readonly constant space) is to avoid having to follow pointers into pure space; this ought to be unnecessary because pure objects can't keep dynamic space objects live. If you allow pointers from pure space into the rest of the heap, then that invariant no longer applies, and you are forced to trace pure objects just like any other. Am I missing something here? . . . I welcome thoughts and especially explanations and help on this. I've been tracking down these issues off and on for weeks, and in plenty of detail for most of the past week. Help! -- c I wish I understood even a tenth part of Parrot's memory management. Given that handicap, I'd be happy to help, in whatever way I can, but I'm afraid it will take a while to get me up to speed. -- Bob