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

Home » Public Forums » archive » Re: Windows XP memory limitation?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Windows XP memory limitation? [message #37221] Mon, 08 December 2003 10:38 Go to next message
dcw_yip is currently offline  dcw_yip
Messages: 22
Registered: October 2003
Junior Member
Thanks everyone for the responses. Unfortunately none of them worked.
Contrary to what RSI says, there must be a built in memory limitation
or bug in IDL. I'm running 6.0 by the way. Once IDL crashes out with
the memory error, if I type in "BYTARR(120000000)" in the command
window I get "Unable to allocate memory: to make array." Even though
I still should have about 2GB of RAM available. I'm using the /3GB
flag in XP Pro. But if I try to allocate the same amount of memory in
C using "malloc(120000000)" it works just fine. This is while IDL is
in it's crash state. So there is that much available memory available
in the system. In fact if I use "malloc(1200000000)" in C it still
works. That's 10 times the amount of memory that fails under IDL
under the same conditions.

David
Re: Windows XP memory limitation? [message #37247 is a reply to message #37221] Fri, 05 December 2003 11:31 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Chevrier writes:

> your options are to switch to a 64-bit version of windows, switch to
> another OS, or to be much more memory efficient, such as using the
> temporary function appropriately and making sure you delete variables
> you are no longer using. see david fanning's site
> http://www.dfanning.com/tips/delete_all_vars.html
> a slight modification of it to get only one variable to be erased is
> PRO disappear, getRidOfMe
> END
> and call it from your program as
> disappear, temporary(largeArrayToDelete)

Actually, I think what you are looking for is UNDEFINE:

http://www.dfanning.com/variable_undefine.html

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Windows XP memory limitation? [message #37248 is a reply to message #37247] Fri, 05 December 2003 10:38 Go to previous messageGo to next message
David.Chevrier is currently offline  David.Chevrier
Messages: 14
Registered: May 2003
Junior Member
i came across this problem too even though I have 4gb of ram. it has
to do with all 32-bit versions of windows only allowing about a 1gb
for programs to run. its more complex than just that, but you can
read about it here
http://www.rsinc.com/services/techtip.asp?ttid=3346
http://www.rsinc.com/services/techtip.asp?ttid=3512

i found that adding /PAE switch to the boot.ini file helps get me a
little bit more memory.

your options are to switch to a 64-bit version of windows, switch to
another OS, or to be much more memory efficient, such as using the
temporary function appropriately and making sure you delete variables
you are no longer using. see david fanning's site
http://www.dfanning.com/tips/delete_all_vars.html
a slight modification of it to get only one variable to be erased is
PRO disappear, getRidOfMe
END
and call it from your program as
disappear, temporary(largeArrayToDelete)

if your using mesh commands, try conserving memory like this
verts=MESH_SMOOTH(TEMPORARY(verts),conn)
hope that helped
-dave
Re: Windows XP memory limitation? [message #37252 is a reply to message #37248] Fri, 05 December 2003 05:10 Go to previous messageGo to next message
Robert Moss is currently offline  Robert Moss
Messages: 74
Registered: February 1996
Member
This is a well known limitation of Windows. See the following Tech Tip:

http://www.rsinc.com/services/techtip.asp?ttid=3346

Robert Moss

David Yip wrote:
> The code that I'm working on is dying with a "Unable to allocate
> memory: to make array." in MESH_SURFACEAREA. It dies when the machine
> has allocated a little over 800MB of memory. Why does it do that?
> I've tried it on two different windows machines with 4GB and 2GB of
> RAM respectively. So there should be plenty of RAM available. It
> doesn't run into this problem under Linux or on a Mac. Is there some
> sort of RAM limitation with IDL under Windows?
>
> thanks,
> David
Re: Windows XP memory limitation? [message #37342 is a reply to message #37221] Tue, 09 December 2003 08:23 Go to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
"David Yip" <dcw_yip@yahoo.com> wrote in message
news:201431cc.0312081038.47b3503e@posting.google.com...
> Thanks everyone for the responses. Unfortunately none of them worked.
> Contrary to what RSI says, there must be a built in memory limitation
> or bug in IDL. I'm running 6.0 by the way. Once IDL crashes out with
> the memory error, if I type in "BYTARR(120000000)" in the command
> window I get "Unable to allocate memory: to make array." Even though
> I still should have about 2GB of RAM available. I'm using the /3GB
> flag in XP Pro. But if I try to allocate the same amount of memory in
> C using "malloc(120000000)" it works just fine. This is while IDL is
> in it's crash state. So there is that much available memory available
> in the system. In fact if I use "malloc(1200000000)" in C it still
> works. That's 10 times the amount of memory that fails under IDL
> under the same conditions.

There's still a big difference in the largest contiguous block of memory
that you can allocate from a stand-alone C program, a Win32 application, and
a Win32 application with MFC. If you build your C test program as a Win32
app with MFC, I doubt that it will be able to allocate a contiguous block as
big as a simple console app can.

You may also want to read the thread "Memory Headaches" posted to this
newsgroup starting Aug 1, 2002. There is a lot more detail in the thread
and some mention of some tools you can use to determine what is fragmenting
your memory space.

IDL has no self-imposed memory limitations that might be responsible for
your observations.

Karl
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: MIN_CURVE_SURF bug??
Next Topic: Error when running ICONTOUR

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

Current Time: Wed Oct 08 13:37:43 PDT 2025

Total time taken to generate the page: 0.00586 seconds