Skip to main content
4 of 5
added 61 characters in body
ilian
  • 25.5k
  • 4
  • 117
  • 187

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!