The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Memory leak in Matlab
Replies: 3   Last Post: May 15, 2008 6:09 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 111
Registered: 12/9/05
Re: Memory leak in Matlab
Posted: May 15, 2008 3:45 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Thanks for your suggestion.
Still, the problem persists.
The problem must have something to do with jvm, but its not
the totalMemory used by JVM which is just a neglible 200Mb
and stays rather constant.
I am loosing 100Mb of mem with each function call!


On May 15, 12:35 am, "us " <> wrote:
> ben:
> <SNIP (jvm?) memory problems...

> > I tested R2007b and R2008a. Strangely enough, the problem
> did not occur when the java virtual machine was not loaded.

> > Which tests would you suggest...
> one of the (possible) solutions
> % try to look at and free some jvm memory
> hdr={
> 'max = mem JVM will try to use:'
> 'total = mem in JVM:'
> 'free = mem in system:'
> 'delta = mem freed'
> };
> import java.lang.*;
> r=Runtime.getRuntime;
> mem1=[r.maxMemory,r.totalMemory,r.freeMemory,0];
> disp([hdr,num2cell(mem1).']);
> disp('> GARBAGE COLLECTING...');
> r.gc;
> mem2=[r.maxMemory,r.totalMemory,r.freeMemory,0];
> mem2(end)=mem2(3)-mem1(3);
> disp([hdr,num2cell(mem2).']);
> just a thought...
> us

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.