IDL 5.4 eating up memory under Solaris [message #34172] |
Sun, 23 February 2003 07:51 |
Philippe Cattin
Messages: 1 Registered: February 2003
|
Junior Member |
|
|
Hi,
Problem: I have written an IDL program that tracks a point in a sequence of about 500 tif images. Although my program loads only 2 images at a time, the physical memory (768MB) gets filled up pretty fast (tested with gkrellm and top). What I find even worse is, that memory is NOT reclaimed by the operating system when I exit IDL! But when I restart IDL, it seems to be capable to somehow reuse that lost memory!?! However, the wasted memory is lost for other applications.
Although 20-30MB of RAM is enough to solve the task, IDL fills-up the entire physical memory.
I have read all old posts on this newgroup concearning memory problems such as leaks and fragmentation. However, I still can't find the source of problem in my code. So I compiled a small sample program that demonstrates my problem (Solaris with IDL 5.4)
IDL> print,!version
{ sparc sunos unix 5.4 Sep 25 2000 32 64}
sample programm:
PRO test
cur=0
imgs=dialog_pickfile(/READ,/MUST_EXIST,/MULTIPLE_FILES,$
PATH='.',FILTER='*.tif')
num=N_ELEMENTS(imgs)
HELP,/memory
WHILE cur+1 LT num DO BEGIN
tmp_img=READ_TIFF(imgs[cur+1])
UNDEFINE,tmp_img
cur=TEMPORARY(cur)+1
ENDWHILE
HELP,/memory
END
When I run the 'test' programm with 250 tif images (1MB each), about 250MB of physical RAM is lost.
heap memory used: 383442, max: 391831, gets: 547, frees: 72
heap memory used: 383778, max: 1403715, gets: 1302, frees:825
and the help,/memory function lies about the real memory consumption.
running the very same program on my w2k laptop works fine. unfortunately switching platform is not an option, since I use a library that is only available on solaris.
does anybody have a solution to this problem?
kind regards, Philippe
--
Dr. Philippe C. Cattin cattin-AT-vision.ee.ethz.ch
Swiss Federal Institute of Technology, ETHZ Tel: +41-1-632 25 29
Computer Vision Laboratory, CH-8092 Zuerich Fax: +41-1-632 11 99
|
|
|