Typed GC
evansl
cppljevans at suddenlink.net
Wed Feb 26 08:25:26 PST 2014
On 02/12/14 06:11, Shammah Chancellor wrote:
> With all the talk of garbage collection. I was wondering if it would be
> useful to make the GC typed. If it was typed, it maybe be possible to
> make it more efficient via type information, (such as only scanning
> reference fields). Also, it could have access to attribute information
> if applicable.
>
> -S.
>
Hi Shammah,
In an earlier thread, Andrei proposed:
I suspect that allocating and manipulating objects on the GC heap in
particular may have certain restrictions. One possibility to avoid
such restrictions is to have a function typify(T)(void* p) which
ascribes type T to heap location p.
which would be one way to at least record the type of each memory
location. However, later posts in that thread indicated there
were problems with where to store that information. I thought
you could store it in the heap along side the pointed to object;
however, that seemed to have problems, according to this post:
http://forum.dlang.org/thread/lao9fn$1d70$1@digitalmars.com?page=12#post-jgommvkndygzcpxxotly:40forum.dlang.org
So, the idea seems good, but I'd guess implementation is problematic.
At least that's what I guess from the referenced posts.
-regards,
Larry
More information about the Digitalmars-d
mailing list