help-octave
[Top][All Lists]
Advanced

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

Re: memory exhaust


From: Przemek Klosowski
Subject: Re: memory exhaust
Date: Mon, 6 Nov 2006 13:23:39 -0500 (EST)

   Can we increase the amount of memory used by octave to overcome the
   memory exhaust problem?

What memory exaust problem? you need to provide more detail, like
what version of Octave, what OS you are running it on, what are you
doing when you get the 'memory exhaustion'. Otherwise, we can only
provide some general remarks. 

A standard octave distribution is compiled with 32-bit pointers, and
can allocate a total of 2GB of data. You can compile it with 64-bit
pointers and then it succesfully allocates large arrays:

> I compiled octave with 64-bit pointers on an Itanium box with 32GB of
> memory, and then did a=rand(1e9,1):
> 
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 16674 przemek   25   0 7721m 7.5g  19m R   50 24.9   1:27.21 octave
> 
> generating those billion random numbers takes 137s; a sum() takes 86s.

Of course your computer has to have enough memory to allocate even the
2GB. Under Linux, your combined physical and swap memory has to be
larger than what you request. Under Windows, the rules are murkier,
and really depend on which version of Windows and Octave are you
running. So, one answer might be that we can increase the amount of
memory used by Octave by having you purchase more memory for your computer.

You may be in a situation where the memory exhaustion is caused by
some libraries that you are calling, rather than directly by your
program.  If that's the case, it's even more important for you to say
what you're doing, because there may be another way of accomplishing
it which would require less memory.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]