I figured I go with storing it on disk only if I can't do it in memory.
I'm not sure right now exactly how I could use it from disk, but it
works now if the whole thing is in memory. Here I must cite the virtue
of laziness. (Though in this context, I'm not certain that it's still a virtue...)
Found this in the Perl CD Bookshelf:
- *PERL_DEBUG_MSTATS
- Relevant only if Perl is compiled with the malloc function
included with the Perl distribution (that is, if perl -V:d_mymalloc yields "define").
If set, this causes memory statistics to be displayed after execution.
If set to an integer greater than one, also causes memory statistics
to be displayed after compilation.
...but that gives me 'undef', so that's out for me.
If your Inline C suggestion is possible, it's beyond my current capabilities... :-(
So, I'm off to read all about GTop, then!