Re: memory leak in volume() [message #92184 is a reply to message #92183] |
Wed, 28 October 2015 03:39   |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Wednesday, October 28, 2015 at 12:58:12 AM UTC+1, David Grier wrote:
> Dear Folks,
>
> The Volume() function appears to leak memory in IDL 8.5, leading to frequent
> crashes under both Mac and GNU/linux (Mac: Yosemite 10.10.5, XQuartz 2.7.8;
> Ubuntu 15.04 and 15.10). Running from the command line, a few calls to Volume() will
> cause IDL to quit to the UNIX prompt with a Bus error: 10, which is indicative of a memory leak.
> Crashes are more frequent with large data sets.
>
> Once IDL has crashed this way the first time, restarting IDL and trying to create any function-graphics window will lead to another abrupt crash. The only way to fix this is to restart the X server, for instance by logging out and logging in again.
>
> This is too bad because volumetric rendering is still one of the things that IDL does
> better than the competition, at least IMHO.
>
> TTFN,
>
> David
Hi David,
I've just tried something using some real data I had 512x509x230 on my windows machine:
IDL> help, bytCube
BYTCUBE BYTE = Array[512, 509, 230]
IDL> !version
{
"ARCH": "x86_64",
"OS": "Win32",
"OS_FAMILY": "Windows",
"OS_NAME": "Microsoft Windows",
"RELEASE": "8.5",
"BUILD_DATE": "Jul 7 2015",
"MEMORY_BITS": 64,
"FILE_OFFSET_BITS": 64
}
Then I just made 50 time a volume:
outStrings = strarr(50)
for i=0,49 do begin & v = volume(bytCube, /ZERO_OPACITY_SKIP, RENDER_EXTENTS=0, hints=3, /AUTO_RENDER) & v.close & help, /memory, output=out & outStrings[i] = out[0] & endfor
;get the heap memory used into outUsedLon
outUsedStr = strsplit(outStrings,/extract)
outUsedLon = lonarr(50)
for i=0,49 do outUsedLon[i] = long((outUsedStr[i])[3])
p = plot(outUsedLon)
mx = max(outUsedLon)
mn = min(outUsedLon)
relChange = (mx-mn)/float(mx+mn)
print, 'Relative change = ', relChange
The result is a constantly increasing plot (there is some memory going lost somewhere), but the relative change is very small:
Relative change = 4.47812e-006
So at least in my case, I could not reproduce your problem.
Cheers,
Helder
|
|
|