comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » H5F_OPEN/H5F_CLOSE apparent memory leak
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
H5F_OPEN/H5F_CLOSE apparent memory leak [message #76187] Fri, 20 May 2011 06:13
Juggernaut is currently offline  Juggernaut
Messages: 83
Registered: June 2008
Member
I'm using IDL 7.1.1
Windows XP SP3

I have several HDF5s (some are very large...on the order of 10s of
gigabytes a piece) and I have some automated processing of datasets
inside these files I'm doing. After watching a few hundred files zip
by I started to see a memory leak (only recoverable by a restart of
the computer, reset and full_reset do not work). The leak eventually
eats up several gigabytes of memory if a few hundred files are loaded.

At first I thought I wasn't freeing a pointer or something to that
effect but after scouring through my code I couldn't find anything.
To separate the problem after I restarted my computer I simply took
those same files and ran the following test on them.

for i = 0, 299 do begin
fid = h5f_open(files[i])
h5f_close, fid
endfor

This simple for loop produced the memory leak in question. I could
actually watch the memory rise as the for loop progressed and was then
unable to reset the memory that IDL used without the full restart of
the computer.

If you run that for loop twice in a row, the second time will be
incredibly fast and no extra memory is used. My guess here is that it
has cached the file information at this point making it perform
quickly.

Has anyone else seen anything like this?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL-way to use WHERE result as subscripting indices without having to do IF count
Next Topic: Re: IDL-way to use WHERE result as subscripting indices without having to do IF count

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:03:11 PDT 2025

Total time taken to generate the page: 0.00495 seconds