Solve memory problems [message #64623] |
Tue, 13 January 2009 05:28  |
corinnefrey
Messages: 18 Registered: November 2006
|
Junior Member |
|
|
Hi everybody,
Again I am confrontend with memory problems in IDL. I am working with
satellite images and their derivatives and therefore I am often
confronted with huge datasets.
Well, running a routine once, some common tricks may help to enhance
the available memory:
- Use the temporary-function,
- Put the variables, I don't need anymore, to zero,
- Working as much as possible with interger or byte arrays,
- etc.
However, specially when running an already optimized routine several
times (e.g. for several scenes), available memory will disappear over
short or long. I guess, this has to do with the growing fragmentation
of the memory.
A solution could be to use the same variables for different grids in a
subroutine. However, I prefer to name the variables according to their
physical (or whatever) meaning. Otherwise, after some time, I don't
have any chance to understand my programms anymore.
In my dreams, delvar is available also in routines. However, it's not,
is it?
So, after this long introduction: What strategies are you using, to
have more memory available, or to prevent the fragmentation of the
memory?
Thanks for any comments.
Regards,
Corinne
|
|
|