On Sep 24, 2007, at 3:57 PM, Roger P. wrote:
VmStk: 120 kB
Why wouldn’t it be?
If you are loading objects into memory and keeping them in use, then
memory will bloat.
In garbage collected languages, even though memory management is
technically done for you, the way you write a program still makes it
bloat or not. But if you’re wondering, most new systems sold today
ship with 1gb of RAM. The OS will generally use all of it that it can
use and keep some for swapping things in and out in memory.
Garbage Collection is not as sophisticated as the OS’s memory
management for sure!
I’m not claiming to be an elite expert or anything, but the way you
manage objects even with GC will still determine how big of a
footprint an app tries to claim.
If you’re processing lots of data, you can definitely expect a bigger
load, but it all depends on how much you try to process at once and
what you try to do with it. I see you’re using RegExes, and greedy
RegExes can be big bloaters. But for the same reasons that simply
loading an entire big text file into objects (one for each line,
often) can be a big drain too. If you don’t know how big they are,
or the data source is, you should be limiting it by only reading the
source of data X number of bytes at a time.
Maybe you already are, but if you’re not, you need to manage the flow
of data in (and out) of the program.
Airports can’t process all the passengers at once, so they queue
them. If planes stop leaving, then people have to stop entering the
terminals or it will get too crowded to function!