Re: Solve memory problems [message #64686 is a reply to message #64623] |
Wed, 14 January 2009 05:37   |
corinnefrey
Messages: 18 Registered: November 2006
|
Junior Member |
|
|
hi jean,
i have never used pointers, so my question is: do you use separate
pointers or whole pointer-arrays for your bands? what do you do, if
your bands have different sizes due to different spatial resolutions
(which you might interpolate later in the programme)?
i'm still trying to figure out, what the advantage of pointers is.
example: i have created an float array a with 4000x5000 elements and
don't need it anymore. so i want to get rid of it. does it make a
difference, if i put a=0 or if i set the value of the pointer of the
array to zero?
regards,
corinne
> In my own program, I do all the analysis on a modified version of my
> original image (a classified land-use map, with the background values
> removed so the data is a 1D array), then, at the very end, I
> re-transform it to save and display it. I save a lot of memory!
> Moreover, all bands are saved in pointers, allowing the program to run
> on almost any computer, while the original version, which did not use
> much pointer, was making my work-beast run out of memory fairly quickly!
>
> Jean
|
|
|