How to expand large arrays? [message #4032] |
Tue, 18 April 1995 00:00 |
art.croucher
Messages: 11 Registered: March 1995
|
Junior Member |
|
|
I am trying to read in a large but unknown amount of data, and am
getting (IDL 3.6.1 VMS and Windows) 'unable to allocate core' crashes
long before I should be out of memory. Is there something that causes
IDL to allocate something like 5x the size of the array being used? I
understand that a temporary array is created, but I thought this would
limit me to an array 1/2 the size of the available memory.
I create a large array and expand it by either concatenation or by
creation of a new array and pasting. In both instances, I crash when
using 1/5 of my memory quota and less than half the physical memory
available (according to IDL help,/memory. The respective operating
systems say I'm at the limit of both physical and virtual). Yes, I
created enough huge images to use my expected quota - got just the
numbers I expected.
Can anybody tell me what is going on, and how can I create an array
that is large but nowhere near the quota?
The two methods I tried were:
temp=(~10000,2)
data=[temporary(data),temp]
and
temp=fltarr(npts+10000,2)
temp(0,0)=data
data=temp
temp=0
Both crashed when the IDL-reported memory usage was 9MB of my 50 MB VMS
quota (VMS said I was using all 50MB).
Thanks,
Art Croucher
Johns Hopkins Applied Physics Lab
art.croucher@jhuapl.edu
|
|
|