[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make large array



I can make array around 1GB in WIN2000 as below:

IDL> b=bytarr(1024,1024,512)
IDL> a=bytarr(1024,1024,512)
IDL> c=bytarr(1024,1024,512)
% Unable to allocate memory: to make array.
% Execution halted at:  $MAIN$
IDL> help,/mem
heap memory used: 1074113975, max: 1074114003, gets:      448, frees:      209
IDL> a=0
IDL> b=0
IDL> a=bytarr(1024,1024,1000)
IDL> help,/mem
heap memory used: 1048948020, max: 1074113975, gets:      454, frees:      216
 

renjie wrote:

The results below are obtained in WIN98, in WIN2000 I can make single array of 512MB, can someone explain it.

renjie wrote:

 


Below are my tests, though the heap memory can be increased till the maximum of RAM+VM (my machine is 512MB+2GB), the
maximum size for a single arrary can not be larger than 256MB, I really need to make array around 1GB, if anyboy can config out
what is wrong with my system. Thanks.

IDL> b=bytarr(1024,1024,255)
IDL> help, /mem
heap memory used:  267652748, max:  535039712, gets:      395, frees:      148
IDL> b=bytarr(1024,1024,256)
% Unable to allocate memory: to make array.
% Execution halted at:  $MAIN$                 
IDL> help, /mem
heap memory used:  267652748, max:  267652776, gets:      398, frees:      151
IDL> c=bytarr(1024,1024,255)
IDL> help, /mem
heap memory used:  535039699, max:  535039727, gets:      402, frees:      154
IDL> d=bytarr(1024,1024,255)
% Unable to allocate memory: to make array.
% Execution halted at:  $MAIN$                 
IDL> help, /mem
heap memory used:  535039699, max:  535039727, gets:      405, frees:      157
IDL> d=bytarr(1024,1024,125)
IDL> help, /mem
heap memory used:  666111805, max:  666111833, gets:      409, frees:      160
Alex Schuster wrote:
renjie wrote:

> I tried to make large array, however, in Windows,
> the largest I can made is 256MB, and in Unix is 1 GB,
> it's supposed that the limitation is 2GB, do you have any
> idea about the largest array in IDL?

We habe encountered a problem with IDL and NT, where IDL is only able to
allocate 800 MB of memory in one step, even if it can allocate more
memory afterwards. But 256 MB is much too low, presuming there is enough
physical+virtual memory.

In Unix, I can allocate more than 1 GB:

--> idl
IDL Version 5.2.1 (sunos sparc). (c) 1999, Research Systems, Inc.
Installation number: 80864-0.
Licensed for use by: MPI Forschung

IDL>  b=bytarr(1024,1024,1200)
IDL> help, /mem
heap memory used: 1258497902, max: 1258497930, gets:      227,
frees:       89

The limit command tells you about the datasize you are allowed to
allocate, maybe this is set too low for you. And maybe there's a similar
setting for Windows?

        Alex
--
  Alex Schuster     Wonko@weird.cologne.de          PGP Key available
                    alex@pet.mpin-koeln.mpg.de