osdir.com
mailing list archive

Subject: NDArray memory leak? - msg#00054

List: gnu.octave.bugs

Date: Prev Next Index Thread: Prev Next Index
My Monte Carlo simulation keeps running out of memory. I traced the
problem to a memory leak in the following code:

function memtest
N = 100;
x = zeros([1 1 N]);
while 1
for i = 1:N
x(:,:,i) = 2;
end
end

I see the memory leak in 2.1.73 and 2.9.4 (installed from binary on
Debian etch). Can anyone duplicate the result?


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: Binary Operator Changed in Error Report

On Tue, 16 May 2006, David Bateman wrote: > The only easy way I see the treat this is to create an entirely new > binary operator for ~=, as the code that prints this error is just based > of the operator definition it is given. However, this means that all of > the types would need to define this new operator, rather than treat it > as an alias for !=. I think that a bit messy. Then don't worry about it. It is just cosmetic. Bill -- "Base 8 is just like base 10, if you are missing two fingers." -- Tom Lehrer

Next Message by Date: click to view message preview

Re: Binary Operator Changed in Error Report

On 5/12/06, Bill Denney <denney@xxxxxxxxxxxxxx> wrote: > I use ~= for the not equal operator, and when I get an error, it says > > ... > error: evaluating binary operator `!=' near line 49, column 22 > ... > > It's aesthetic only, but it's at least momentarily confusing because I > never use !=. I've noticed that error messages will reformat my code. For example: >> debug_on_error = 1; >> memtest error: `fx' undefined near line 3 column 5 error: in /home/me/memtest.m near line 3, column 3: >>> y = fx (x); I wrote it as y = fx(x) without the space.

Previous Message by Thread: click to view message preview

Re: Parse Error for Function in []

Bill Denney wrote: >I have been getting parse errors with lines like > >orphans = [get (0, "orphans"), h]; > >The error comes on the first double quote. I've been working around by >just assigning the value of the result to a variable then doing the >concatenation. > >This is in 2.9.5 that I compiled in cygwin on XP. > > This is matlab's fault for defining a language where you can type [1 2] rather than requiring [1,2]. The above is parsed as a variable 'get', then '(0, "orphans")' that is a syntax error and then a variable "h". The only way to fix this is to eliminate the space between 'get' and the '('.. D. -- David Bateman David.Bateman@xxxxxxxxxxxx Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob) 91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax) The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary

Next Message by Thread: click to view message preview

Re: NDArray memory leak?

Keith Goodman wrote: > My Monte Carlo simulation keeps running out of memory. I traced the > problem to a memory leak in the following code: > > function memtest > N = 100; > x = zeros([1 1 N]); > while 1 > for i = 1:N > x(:,:,i) = 2; > end > end > > I see the memory leak in 2.1.73 and 2.9.4 (installed from binary on > Debian etch). Can anyone duplicate the result? > > This looks like the same error that was reported here: http://velveeta.che.wisc.edu/octave/lists/bug-octave/2006/150 I think it was fixed in 2.9.5. -Quentin
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by