comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to allocate memory for an array of more than 2G
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to allocate memory for an array of more than 2G [message #71675] Tue, 13 July 2010 20:45 Go to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
"NEW-IDL-USER" <mchen911@gmail.com> wrote in message
news:c5a17126-f507-41bf-84d9-6260b9f0ec33@i18g2000pro.google groups.com...
> Hi,
> I have a trouble to read a .h5 file which is about 3G.
> I am using {x86_64 linux unix linux 7.1.1 Aug 21 2009 64 64} IDL. So
> you see, my system is 64 bit and IDL is also 64 bit. The problem I
> cannot allocate a memory for an array more than 2G. I do not know why?
> Can someone help me?
> Thanks a lot!
>
> IDL> help,/memory
> heap memory used: 818394, max: 1074560678, gets: 1069,
> frees: 258
> IDL> a=bytarr(1024,1024,1024)
> IDL> help,/memory
> heap memory used: 1074560268, max: 1074560367, gets: 1081,
> frees: 269
> IDL> a=bytarr(1024,1024,1024)
> % Unable to allocate memory: to make array.
> Cannot allocate memory

Hello New,
I have no idea why you cannot allocate that memory.
In fact, you call a = bytarr() twice, so it looks like you can
only allocate one gig. How much memory is on your machine?

And are there quotas involved on the IDL process (perhaps you should
ask your sys admin).


for instance, you should be able to do this.

IDL> a=bytarr(1024,1024,1024)
IDL> b=bytarr(1024,1024,1024)
IDL> c=bytarr(1024,1024,1024)
IDL> d=bytarr(1024,1024,1024)
IDL> help,/mem
heap memory used: 4303438407, max: 4303438540, gets: 107997, frees:
98790
IDL> e=bytarr(1024,1024,1024)
IDL> f=bytarr(1024,1024,1024)
IDL> help,/mem
heap memory used: 6450922396, max: 6450922529, gets: 108015, frees:
98806


cheers,
bob
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: read XML with IDL
Next Topic: Re: Calculation of intersection on map

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:17:24 PDT 2025

Total time taken to generate the page: 0.00394 seconds