Re:Assault by GC
by JoachimSchipper on Monday October 24, 2011 @03:10PM
(#3151053)
Wouldn't the GC still need to check for references from permspace objects? (It's probably still a noticeable performance boost.)
Your language could disallow references from permspace to normal space. Or even make permspace objects immutable.
Or just track the (presumably few) mutations of permspace objects for special handling. In that case, permspace effectively becomes an infinitely long-lived generation that is never collected, only used as a source of roots.
Re:Assault by GC
by stcredzero on Tuesday October 25, 2011 @09:13AM
(#3153925)
Bingo. I should have written "GC only uses it as a source of roots."
For many years now, some Smalltalk VMs have had "permspace." You just send a message to a long lived object, and it's moved to a different part of memory considered permanent, and the GC never looks at it. No structs. Just call a function on the permanent objects. Since it's in a different space, this is also very efficient for the VM, since identifying a permanent object is just a comparison of addresses.