Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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 ]
ben

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!

Bye
Ben

On May 15, 12:35 am, "us " <u...@neurol.unizh.ch> 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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.