Hi all,
I'm trying to clean up memory problems in a somewhat involved app and
looking for ways of measuring the problems. Can anyone point to maybe a
white paper on finding and addressing such things?
So far I've just put statements in various areas of the code that write a
record to a table indicating the current memory usage (as told by SYS(1016))
at that point. This seems to be a pretty ineffective--at least at
diagnosing a technique that might cause the problem. For example, I found
one interval that consistently increased in memory usage by around 2600
bytes most times it executed (a few thousand). Trying to recreate the
problem in an isolated setting, I put
together a small prg that just did those same steps in a loop. In this
case, though, the memory change was 0.
I've tried adding SYS(1104) in varying locations/timings in the program, but
no change to speak of occurs in any case. I had some suspicion that
printing was causing it but have found little to back this (at least not
with SYS(1016)) and I am somewhat restricted in my driver options.
Next up is tweaking memory w/ SYS(3050), but that still will only extend the
time before running out of memory. Are there better ways of pinpointing
where memory leaks occur w/in an app or are these pretty much all we have?
Even like shell commands?
TIA,
John