new principle of division between structures and classes
Brad Roberts
braddr at puremagic.com
Mon Jan 12 17:50:19 PST 2009
On Tue, 13 Jan 2009, Bill Baxter wrote:
> I'm not and expert in garbage collection but...
> An interesting point was made yesterday on the GDAlgorithms mailing
> list. Acording to this one game industry veteran, you don't need a
> fully moving garbage collector to get many of the benefits. If *some*
> of the memory can be moved around then often that's enough to fill in
> the gaps and keep fragmentation down.
>
> So it may be worth while to have a special kind construct for
> containing data that the compiler is free to move around. This type
> would have a hidden pointer inside of it that can be moved around by
> the gc, but applications would not be allowed to access that pointer.
> And I suppose that means all access to the data would given via
> lvalue only. Probably wouldn't take much on the part of the GC to
> provide the necessary hooks. Just some sort of "relocatable alloc"
> call. Rest could probably be handled in higher level libs.
>
> But like I said I don't know much about GC.
>
> --bb
And wouldn't ya know it.. I spent parts of saturday pondering on exactly
how to implement exactly that. I've got most of the code pictured in my
head, but none of it written. :)
Maybe one day I'll make the time to try it.
Later,
Brad
More information about the Digitalmars-d
mailing list