On Mon, Aug 4, 2014 at 7:11 PM, Matt Oliveri <[email protected]> wrote:

> I had a little idea for easily making correct releaseObject
> implementations: Basically just traverse, but use some RTTI to skip
> substructures that never contain pointers of the type you're looking
> for. It's conceptually simple, seems like it could often slightly beat
> regular traversal, and sometimes seriously beat it. But I haven't
> tried it, of course. It could turn out that on average it's not good
> enough to make up for overhead.
>

Any strategy which enables sub-heap tracing instead of full-heap tracing to
handle granular release has the potential to win in scenarios where there
are lots of tenured sub-heap releases which are a small fraction of the
live heap. This is the reasoning behind any RC based strategy, and it works
out if the programmer avoids cycles (or tends them manually). However, the
margin of benefit is getting smaller.

My interest in the "provably correct releaseObject()" is stirred because it
seems like a possible (though not easy) approach to achieve memorysafe
automatic management of granular heap objects with arbitrary lifetimes,
that matches the performance of manual memory management -- and I've never
heard of any other automatic approach which has even tried this.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to