# ListConvolve Memory Hemorrhage

Bug introduced in 10.0.0 and fixed in 10.2.0.

I wrote a routine that convolves an impulse response array with a test array and checks for the RMS difference between that convolution and a data array. I do this iteratively so that I can modify the test array to obtain an improved fit to the data and eventually generate a good prediction of the test array required to produce the data.

I noticed that my memory in use increases steadily (I've narrowed it down to the ListConvolve function) and I'm hoping someone knows how to mitigate this memory drain.

Here is a simplified code to demonstrate this effect:

z = 1;
herp = Table[1, {i, 1, 10^2}];
derp = Table[0, {i, 1, 10^2}];
Monitor[
While[z < 10^6,

ListConvolve[derp, herp, 1];

z++;
blurg = MemoryInUse[];
ClearSystemCache[];
\$HistoryLength = 0;
];
,{z, blurg}];


Removing the ListConvolve part of the code leaves the memory in use flat.

Any help is greatly appreciated!

• I just determined that if I change the length of the sample arrays herp and derp to be <44, the memory used does not grow. Empirical evidence that the answer to life is 43, not 42... – A. McEvoy Apr 8 '15 at 21:54
• I can't reproduce your findings in versions 7.0.1 or 9.0.1. Which version are you using? – Oleksandr R. Apr 8 '15 at 22:42
• I'm filing a bug report on this. – Daniel Lichtblau Apr 9 '15 at 0:32
• I can reproduce it in 10.1.0 and 10.0.2 but not 9.0.1, OS X Yosemite. – Szabolcs Apr 9 '15 at 0:43
• I gather it has been addressed in our current development version. – Daniel Lichtblau Apr 9 '15 at 2:38