[Top][All Lists]

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

Re: large arrays and error virtual memory exhausted

From: John Eaton
Subject: Re: large arrays and error virtual memory exhausted
Date: Wed, 07 Jun 95 00:55:22 EDT

Joao Cardoso <address@hidden> wrote:

: I have the following error in octave-1.1.1  on a sco 3.2v4.0 with 
: 16Mbytes of memory and 20Mbytes of swap,
:       "error: new: virtual memory exhausted -- stopping myself"
: when working with large arrays (500x500 and greater).
: It seems to me that the error "new: virtual memory exhausted" comes from gcc,
: but I can't check it, as I have already removed the sources.

This message comes from Octave's octave_new_handler function.  It will
happen when memory allocation fails within Octave.

: The strange thing is that virtual memory does not seem to be exhausted.

An attempt to allocate more memory than is currently available will
simply fail, and the allocation will not happen.  The system will not
allocate whatever happens to be available, so you probably won't see
the free memory actually go to zero.

: When creating large matrices, is it better, both in terms of memory 
: allocation/fragmentation (and execution speed) to previously allocate 
: a full matrix?


: In a function is it wise to clear an unneeded variable?

Maybe.  This might be useful if the variable is always known to use
a lot of memory, but I wouldn't recommend doing it for every counter
that is used just once...

: how? clear, clear -x ?

By clearing the variable by name:  `clear var1 var2 ...'.  Using the
`-x' option *excludes* the named variables and clears all the others.


reply via email to

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