Memory problem [message #3153] |
Sun, 27 November 1994 18:06  |
weertj
Messages: 4 Registered: November 1994
|
Junior Member |
|
|
When I am using local structures in procedures, every time I will lose about
24 bytes (minimum) of the available memory. Also ( for example ) when I click
the mouse in a drawing area about 100 bytes are gone. By the way this memory
is really gone because after some time the machine will run out of memory!
Do anyone has the same problem, or is there an solution.
I am running Pv-Wave on a DEC-Alpha workstation (this is maybe part of the
problem).
-Jacco-
BT
NNNN
|
|
|
Re: Memory problem [message #58734 is a reply to message #3153] |
Sat, 16 February 2008 03:21  |
pook41
Messages: 16 Registered: January 2007
|
Junior Member |
|
|
On Feb 14, 10:32 pm, j...@argentina.com wrote:
> Hi!
> I'm trying to make a very large array:
>
> a=fltarr(5287, 7707, 8)
>
> Then I got the warning: 'Unable to allocate memory: to make array.'
>
> Is there any way to avoid this message?
>
> Best!
> Jurandir
Try 64 bit windows with 64 bit IDL? Here's what I get with 4GB of
RAM :-
IDL Version 6.4, Microsoft Windows (Win32 x86_64 m64). (c) 2007, ITT
Visual Information Solutions
IDL> a=fltarr(5287, 7707, 8)
IDL> help,/mem
heap memory used: 1304694831, max: 1304694831, gets: 505,
frees: 190
IDL> b=fltarr(5287, 7707, 8)
IDL> help,/mem
heap memory used: 2608596228, max: 2608596359, gets: 517,
frees: 199
IDL> c=fltarr(5287, 7707, 8)
IDL> help,/mem
heap memory used: 3912497625, max: 3912497756, gets: 529,
frees: 208
IDL> d=fltarr(5287, 7707, 8)
IDL> help,/mem
heap memory used: 5216399022, max: 5216399153, gets: 541,
frees: 217
Cheers,
Andrew
|
|
|
Re: Memory problem [message #58735 is a reply to message #3153] |
Fri, 15 February 2008 11:53  |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article
<55a45ed0-d7ea-4e0f-8cc7-7c619e4e3a9a@e23g2000prf.googlegroups.com>,
greg.addr@googlemail.com wrote:
>> IDL> print, 5287*7707*8*4
>> 1303901088
>>
>> about 1.3 GB.
>>
>> This is doable on a 32-bit system (assuming that you have 2 GB of RAM),
>> but you will not be able to create two such arrays.
>
> That certainly isn't doable on my 32-bit XP system (2 GB) - its
> limit's just under 1 GB for a single allocation. I've recently started
> using a 64-bit XP exactly to get around this problem. The new system
> seems to be able to allocate properly up to the limit of RAM (I've
> tried to 8 GB):
>
> IDL> a=bytarr(8,1000,1000,1000,/nozero)
>
> Greg
Oh, I should have assumed it was Windows.
Ken
|
|
|
Re: Memory problem [message #58740 is a reply to message #3153] |
Fri, 15 February 2008 08:52  |
greg.addr
Messages: 160 Registered: May 2007
|
Senior Member |
|
|
> IDL> print, 5287*7707*8*4
> 1303901088
>
> about 1.3 GB.
>
> This is doable on a 32-bit system (assuming that you have 2 GB of RAM),
> but you will not be able to create two such arrays.
That certainly isn't doable on my 32-bit XP system (2 GB) - its
limit's just under 1 GB for a single allocation. I've recently started
using a 64-bit XP exactly to get around this problem. The new system
seems to be able to allocate properly up to the limit of RAM (I've
tried to 8 GB):
IDL> a=bytarr(8,1000,1000,1000,/nozero)
Greg
|
|
|
Re: Memory problem [message #58741 is a reply to message #3153] |
Fri, 15 February 2008 07:48  |
zhouqiang.search
Messages: 6 Registered: February 2008
|
Junior Member |
|
|
On 14 Feb, 15:11, Jean H <jghas...@DELTHIS.ucalgary.ANDTHIS.ca> wrote:
> zhouqiang.sea...@gmail.com wrote:
>> On 14 Feb, 07:32, j...@argentina.com wrote:
>>> Hi!
>>> I'm trying to make a very large array:
>
>>> a=fltarr(5287, 7707, 8)
>
>>> Then I got the warning: 'Unable to allocate memory: to make array.'
>
>>> Is there any way to avoid this message?
>
>>> Best!
>>> Jurandir
>
>> I can allocate the array with the same size , I think there is
>> something wrong with your computer or IDL version , mine is IDL 6.3.
>
> ???? ... before blaming the software or the computer, it would be wise
> to ask what is the memory available on the OP computer as well as the
> operating system.
>
> Jean
I think you are right , I am a wholly new comer with IDL , I just
output my result for reference,thanks a lot .
Diving here , I can learn more.
|
|
|
Re: Memory problem [message #58750 is a reply to message #3153] |
Thu, 14 February 2008 06:51  |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article
<bf8e2253-81b6-4b03-ba46-83848d60d8e3@s19g2000prg.googlegroups.com>,
jujo@argentina.com wrote:
> Hi!
> I'm trying to make a very large array:
>
> a=fltarr(5287, 7707, 8)
>
> Then I got the warning: 'Unable to allocate memory: to make array.'
>
> Is there any way to avoid this message?
>
> Best!
> Jurandir
You are trying to make an array that requires
IDL> print, 5287*7707*8*4
1303901088
about 1.3 GB.
This is doable on a 32-bit system (assuming that you have 2 GB of RAM),
but you will not be able to create two such arrays.
Try
HELP, /MEM
to see how much memory you are using before you try to create the array.
Ken Bowman
|
|
|
Re: Memory problem [message #58753 is a reply to message #3153] |
Thu, 14 February 2008 12:11  |
Jean H.
Messages: 472 Registered: July 2006
|
Senior Member |
|
|
zhouqiang.search@gmail.com wrote:
> On 14 Feb, 07:32, j...@argentina.com wrote:
>> Hi!
>> I'm trying to make a very large array:
>>
>> a=fltarr(5287, 7707, 8)
>>
>> Then I got the warning: 'Unable to allocate memory: to make array.'
>>
>> Is there any way to avoid this message?
>>
>> Best!
>> Jurandir
>
> I can allocate the array with the same size , I think there is
> something wrong with your computer or IDL version , mine is IDL 6.3.
???? ... before blaming the software or the computer, it would be wise
to ask what is the memory available on the OP computer as well as the
operating system.
Jean
|
|
|
Re: Memory problem [message #58756 is a reply to message #3153] |
Thu, 14 February 2008 10:57  |
zhouqiang.search
Messages: 6 Registered: February 2008
|
Junior Member |
|
|
On 14 Feb, 07:32, j...@argentina.com wrote:
> Hi!
> I'm trying to make a very large array:
>
> a=fltarr(5287, 7707, 8)
>
> Then I got the warning: 'Unable to allocate memory: to make array.'
>
> Is there any way to avoid this message?
>
> Best!
> Jurandir
I can allocate the array with the same size , I think there is
something wrong with your computer or IDL version , mine is IDL 6.3.
|
|
|
Re: Memory problem [message #58757 is a reply to message #3153] |
Thu, 14 February 2008 10:32  |
Jean H.
Messages: 472 Registered: July 2006
|
Senior Member |
|
|
jujo@argentina.com wrote:
> Hi!
> I'm trying to make a very large array:
>
> a=fltarr(5287, 7707, 8)
>
> Then I got the warning: 'Unable to allocate memory: to make array.'
>
> Is there any way to avoid this message?
>
> Best!
> Jurandir
yes, you can buy more memory and/or switch to linux.
Under Windows, you can have, by definition, at most 2Gb of ram per
process (3Gb indeed, if you trick your system... have anybody tried it
with IDL 7??), while under linux, you have no limit.
Now, IDL always need contiguous memory space to create an array. Under
windows, the operating system uses some small amount of memory located
anywhere, so you can never have more than +- 1.2Gb of contiguous memory.
Under Linux, the operating system uses the beginning of the memory
space, allowing much bigger arrays to be created.
You array is about 1.2 Gb. You can create an array of 8 pointers, each
pointing to a 5287 * 7707 array, which are about 155 Mb.
Another option is to cut down your array in two or more. For example,
you create arrays of a maximum size of 500 * 500 * 7 (whatever), and you
create multiple arrays to contains all your data. Like that, you can
save and restore some arrays to your disk (and therefore free some memory)!
Have a look at the program memtest made by ittvis. It will tell you the
size of the 10 biggest array you can make. I have made a modified
version (search in this newsgroup for "availablememory" or under my name
(jean H) to find it. I use it often to 1) assess the max available
memory, 2) take out the memory that I will need to process my array, 3)
create 1 array of the max possible size, fill it, save it to disk,
remove from memory, 4) create another array etc, 5) restore the first
array, process it, delete it, 6) restore the 2nd array, process it etc.
Good luck with that!
Jean
|
|
|