why does memory consumption keep growing?

Steve D'Aprano steve+python at pearwood.info
Thu Oct 5 20:46:06 EDT 2017


On Fri, 6 Oct 2017 10:38 am, Stefan Ram wrote:

> "Fetchinson ." <fetchinson at googlemail.com> writes:
>>I have a rather simple program which cycles through a bunch of files,
>>does some operation on them, and then quits. There are 500 files
>>involved and each operation takes about 5-10 MB of memory. As you'll
>>see I tried to make every attempt at removing everything at the end of
>>each cycle so that memory consumption doesn't grow as the for loop
>>progresses, but it still does.
> 
>   "2x 8GB DIMM DDR3-1600" cost $95.99 according to a web page.
>   This might be in the order of magnitude of the hourly rate
>   of a freelancing programmer.

Plus the downtime and labour needed to install the memory, if the computer
will even take it.

And then if Fetchinson is right that there is a memory leak, those 16 GB will
soon be not enough, and they'll need to buy another 16GB plus more downtime
and more installation costs.

Memory leaks expand to fill the available memory.


-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list