On Mon, Feb 14, 2011 at 11:59 AM, Jianshi Huang <jianshi.huang@gmail.com> wrote:
Breakdown for dynamic space:
 3,565,552,112 bytes for 19,595,087 simple-character-string objects.
 486,929,728 bytes for 5,092,116 instance objects.
 298,242,320 bytes for 9,637,350 other objects.
 4,350,724,160 bytes for 34,324,553 dynamic objects (space total.)


Okay, it seems the total memory used is about 8GB... and here's
another truncated long unsigned int bug :).

It seems the number of dynamic objects is about double the number of
simple-character-string. And both numbers are huge.

Not quite. The "dynamic objects" line is just a sum of the preceeding lines. So your total memory use is a bit over 4GB, of which 3.5GB is strings. However, during garbage collection the real memory use is going to be higher (since the GC might need to keep both the original data and new copies around simultaneously), in the worst case by a factor of two.

--
Juho Snellman