AA Troubles

Jonathan Crapuchettes jcrapuchettes at gmail.com
Tue May 10 18:54:30 PDT 2011


Hey all,

I have been working with a lot of associative arrays of late and been running 
into some problems with the built-in implementation. It appears that very heavy 
use in an application can cause the garbage collector to have issues. Most of 
the time I have found ways around the problems, but the one that I ran into 
today has made me wonder if there is a less error prone/slower implementation of 
AAs out there for D that doesn't pound the GC as hard. I have looked at the aa 
project at dsource and noticed some discussion on the forums from a little while 
ago, but I wasn't sure how up-to-date everything was.

The problem that I ran into appears, according to gdb, to be in 
gc.gcx.Gcx.findPool(). During the execution of my program, the code halts at one 
point with 1 core maxed (i.e. infinite loop) about 6 minutes into the execution 
with about 2.1GB of memory allocated. When I said that I used the AAs a lot, I 
mean that most of the memory is allocated to classes that are only accessible 
through the AAs. I wish that I could give you an example, but at the point of 
the halt, the program had pulled data from a 60M row database table and run 
through about 500 lines of code.

I know that I usually don't comment in this forum unless I have a problem, and I 
appreciate that I still get replies. Just know that I am a great proponent of D 
and make very heavy use of it in a corporate environment doing a lot of 
cutting-edge economic calculations. Thank you to all who have contributed to D!

Thank you,

Jonathan


More information about the Digitalmars-d mailing list