Re: memory consumption when drawing an idlgrscene object [message #35574] |
Mon, 07 July 2003 15:38  |
Jan[1]
Messages: 3 Registered: July 2003
|
Junior Member |
|
|
Hi guys
Thanks for your help. The problem seems to be fixed, so I will try to
summarise a little bit:
I am using IDL 5.6 for Linux. The way I checked the memory consumption was
basically that I ran my program in IDL, and at the same time I run top to
monitor the memory consumption. By running the program twice, once when
drawing the scene object, and once without drawing the scene (but doing
everything else), I observed the ~18 MB difference in memory consumption.
Another option is to use IDLDE and go through the program step by step
while observing the memory consumption in top. In any case, it was clear
that the actual drawing of the scene would require a lot of memory.
As suggested by some of you, I should make a test program. So I did, and
then by stepping through that in IDLDE I got a good feeling for what is
happening. Obviously, when drawing the scene object, a lot of memory might
be required. When destroying the scene object, this memory is then
released again, or at least most of it. Karl Schultz mentioned that IDL
would cache some information, and I suppose this is what happens here. By
redoing the scene object several times with different arrays, and drawing
the scene each time, the memory consumption will more or less stabilize on
some level.
Also, one of my cleanup routines was not working properly, which meant
that ~18 MB of memory was taken each time a scene was drawn. I did not
look into that before, since I didn't consider it to be the problem. I
still don't understand why an object all of a sudden takes up a lot of
memory just by drawing it (and not when it is not drawn). Any ideas on
that? Because of this, I suppose there is no way of seeing how much memory
each object requires?
If you still want to see my test program, you are welcome, just post a
message. But I think I figured out what happened to the memory, so there's
nothing spooky here. Once again: thanks guys.
Regards,
Jan Staff
|
|
|