in reply to Managing System Memory Resources
I tried your code (on win32) and I see zero memory growth beyond the initial program load with either version, which is pretty much what I expected. The entire program (both loops) never used more that 1.5 MB of ram!
That suggests (perl build differences aside) that the problem lies with the platform rather than perl itself.
Given that you are writing to the file(s) line by line, it would appear as if you OS is caching the entire file in memory.
I know nowt about Solaris, but maybe there is a configuration option, that tells the OS to cache entire files, that can be turned off?
|
|---|