Re: The best way to keep data in RAM / object-oriented programming [message #68783 is a reply to message #68782] |
Thu, 03 December 2009 10:44   |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article
<f9ac2203-ccfc-4917-b300-4db3750b6e37@m38g2000yqd.googlegroups.com>,
nata <bernat.puigdomenech@gmail.com> wrote:
> I'm sorry guys but I don't see the difference.
> I understand what are you explaining and the functionality of the
> NO_COPY KEYWORD but the result is the same...
>
> If I've to store an array fltarr(400,400,24,97) in a pointer, the
> result, in heap memory usage, is the same if I do:
>
> a=fltarr(400,400,24,97)
> b=ptr_new(a)
> a=0l
> help, /heap
>
> or
>
> a=fltarr(400,400,24,97)
> b=ptr_new(a,/no_copy)
> help, /heap
>
> I�ll learn about COMMONs
> Cheers,
> nata
>
>
> So, that's not what I'm looking for. I need to keep the arrays in
> memory but using less memory resources. Is it possible?
400 x 400 x 24 x 97 x (4 bytes) is approx. 1.5 GB.
The only way to use less memory is to use a smaller type
(e.g., INTs) and give up both precision and convenience.
Memory is very cheap nowadays.
Ken Bowman
|
|
|