This content has been marked as final. Show 3 replies
Sorry I thought I had replied to this days ago but the post never seemed to make it.
In theory an implementation could use a scheme whereby heap references written into scope-allocated objects were tracked and hence the load on the GC with respect to scanning the scope lessened. But I'm not aware of an implementation that does that. As far as I know, at this time, Sun Java RTS, simply scans the scope for heap references, hence having the data structure in scope would not save anything in that regard.
Accessing the data structure would also be awkward as you'd have to enter the scope to do so. I'm not sure what kind fo "serialization" you were thinking of.
So a real-time thread could be blocked in scoped-mem while the scope is beeing scanned for heap references ?
Edited by: michee on Apr 29, 2008 5:18 AM
GC should be able to scan a scope concurrently with the scope being used by other threads. If you're after Java RTS specifics then I'll have to get back to you.
There has to be some form of GC/scope "synchronization" but the exact nature is implementation specific. NHRTs should not be blocked from using a scope because the GC scans it, but a NHRT may be delayed entry to, or exit from a scope, because the GC is still scanning it.