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

Home » Public Forums » archive » memory allocation problem
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: Memory allocation problem [message #64111 is a reply to message #63972] Wed, 26 November 2008 09:43 Go to previous messageGo to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
F�LDY Lajos wrote:
>
> On Wed, 26 Nov 2008, kodark wrote:
>> I am a beginner-level user of IDL. Recently I run into the memory
>> allocation problem: 'unable to allocate memory'. I loaded a large
>> image (11820*11820, float, about 530M) into an array. Then when I
>> tried to create two new arrays of the same size, the program said
>> 'unable to allocate memory'.
>>
>> I have read a lot of articles about this problem on the net, but I
>> still cannot solve this problem. My computer runs 32-bit Windows XP
>> with 4GB RAM and I have assigned 10GB from hard drive to Virtual
>> Memory. The virtual memory looks contiguous in the Disk Defragmenter
>> program. I am curious about the following output.
>>
>> IDL> help,/memory
>> heap memory used: 681301, max: 681324, gets: 765,
>> frees: 413
>>
>> Then I executed the MemTest program provided by ittvis
>>
>> % Compiled module: MEMTEST.
>> Memory block # 1: 806 Mb (total: 806 Mb)
>> Memory block # 2: 390 Mb (total: 1196 Mb)
>> Memory block # 3: 214 Mb (total: 1410 Mb)
>> Memory block # 4: 143 Mb (total: 1553 Mb)
>> Memory block # 5: 66 Mb (total: 1619 Mb)
>> Memory block # 6: 59 Mb (total: 1678 Mb)
>> Memory block # 7: 56 Mb (total: 1734 Mb)
>> Memory block # 8: 40 Mb (total: 1774 Mb)
>> Memory block # 9: 27 Mb (total: 1801 Mb)
>> Memory block #10: 23 Mb (total: 1824 Mb)
>>
>> It is obvious that the second largest block is less than 530M.
>>
>> Then
>> IDL> help,/memory
>> heap memory used: 685533, max: 1913289245, gets: 789,
>> frees: 433
>>
>> The heap memory max increased from 681324 to 1913289245.
>>
>> I want to know why the virtual memory is not recognized and used? why
>> the heap memory max changed?
>>
>
> A process can use at most 2 GByte memory on a 32-bit Windows system.
> 10 GByte virtual memory means that you can run five 2 GByte process in
> parallel.
>

To answer your other Q, the heap memory max changed because you ran
memtest.pro which allocated large chunks of memory right up to your
systems maximum (around 1.8GB).

This issue has been discussed at length and I suggest visiting the
ITTVIS website and reading their tech-tips and searching this newsgroup.

You may find this thread helpful:

http://groups.google.com/group/comp.lang.idl-pvwave/browse_t hread/thread/e185e0e1f243423c/7993eae2818df28b?hl=en&lnk =gst&q=memtest#7993eae2818df28b

As of IDL 7 you'll still have to modify the executable to allow it to
benefit from the /3GB option. This isn't outlined in the thread above
but you should be able to google this easily.

-Rick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: cgimage and color tables
Next Topic: Re: Extraction phenological events

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

Current Time: Tue Dec 02 10:04:57 PST 2025

Total time taken to generate the page: 0.39852 seconds