[dmd-internals] Giving better static data limits to the GC
Leandro Lucarella
luca at llucax.com.ar
Sun Aug 22 19:34:23 PDT 2010
Walter Bright, el 22 de agosto a las 15:11 me escribiste:
> Leandro Lucarella wrote:
>
> Walter Bright, el 22 de agosto a las 12:25 me escribiste:
>
>
> I know this is probably really low priority for DMD, but any answer
> would be appreciated, even if it is something like "no idea how doable
> it is, it would take time to think about it and is low priority" :)
>
>
> I don't think spending a lot of effort on the static data is worthwhile,
> as very little of modern programs should consist of static mutable data.
>
> What's held me back from adding in precise scanning data for everything is
> the large expansion of the memory footprint of a program to hold all this
> data.
>
>
> Thanks for the answer. My experiments show that static data is relevant.
> Comparing 2 GC implementations, one with very few types (druntime
> implementation) and another using a few more types, including a couple
> of templates, the second is measurably slower. The types generates
> a *lot* of rw static data.
>
> Even when I agree that it might be too much to add type information to
> the static data, grouping only the static data that should be scanned
> (i.e. D-only global variables, and leaving out all the
> TypeInfo/ClassInfo) can make a big difference.
>
> Would that be too hard?
>
>
> I can look into grouping it, but be aware I've had a lot of problems with
> various linkers trying to get the grouping to work. The Mac linker in
> particular behaves very unreliably and buggily with this, and its behavior
> changes erratically with each new OSX release. I'd worry about it not
> working correctly and the resulting app randomly crashing.
I will be willing to try it out in Linux if you do. Even a really ugly
hack just to make some test would be very useful for me, so I can
confirm or discard that the big static data is what is causing the
problem.
Thanks.
--
Leandro Lucarella (AKA luca) http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
ASALTAN, GOLPEAN SALVAJEMENTE A ANCIANA Y LE COMEN LA PASTAFROLA.
-- Crónica TV
More information about the dmd-internals
mailing list