Re: Trying to understand the memory occupation of big lists

2013-05-03 Thread Maarten
I made a few changes: import gc from memory_profiler import profile @profile def test1(): a = [0] * 1024**2 del a a = [0] * 1024**2 del a a = [0] * 1024**2 del a a = [0] * 1024**2 del a a = [0] * 1024**2 del a a = [0] * 1024**2 del a a = [0] * 1

Re: Trying to understand the memory occupation of big lists

2013-05-03 Thread Dave Angel
On 05/03/2013 07:24 AM, Michele Simionato wrote: I have a memory leak in a program using big arrays. Actually, big lists. Python also has arrays, and they're entirely different. With the goal of debugging it I run into the memory_profiler module. Then I discovered something which is surpri

Trying to understand the memory occupation of big lists

2013-05-03 Thread Michele Simionato
I have a memory leak in a program using big arrays. With the goal of debugging it I run into the memory_profiler module. Then I discovered something which is surprising to me. Please consider the following script: $ cat memtest.py import gc from memory_profiler import profile @profile def test