Re: The continuing saga of WHERE and 2D [message #34317 is a reply to message #34220] |
Fri, 28 February 2003 10:15  |
Pavel Romashkin
Messages: 166 Registered: April 1999
|
Senior Member |
|
|
Hi JD,
Is the same kind of allocation taking place when one simply calls
FLTARR? I bet yes.
I am still puzzled by the fact I can allocate 1.25 times more in the
form of pointer arrays than as a single large array, like
a = FLTARR(290000000) ; This is the limit, out of RAM over this (1.32 Gb)
a = PTRARR(3600, /allocate)
temp = FLTARR(100000)
for i = 0, 3599 do *a[i] = temp ; No problem at all
I am not fully convinced it is not the memory fragmentation issue, but
the difference is too significant. Besides, all this is tested with a
fresh instance of IDL. I tried with fragmented memory and of course, the
difference is far more dramatic (like twice the size using smaller arrays).
In any case, knowing it turned out to be very practical to me. Although
it allows to bring the computer really close to crashing (Mac OS tries
to dynamically reallocate for itself, too, and hates to find out it only
has 4 Mb left).
Pavel
JD Smith wrote:
>
> On Thu, 27 Feb 2003 15:47:12 -0700, David Fanning wrote:
>
>> IDL> c= b[0:4999]
>> IDL> a[c,c,*] = 5
>
> This assignement allocates about 800MB of memory for the index array.
> Read my other post to find out why ;).
>
> JD
|
|
|