help-octave
[Top][All Lists]
Advanced

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

Re: Freeing up memory occupied by mex ?


From: Rishi Amrit
Subject: Re: Freeing up memory occupied by mex ?
Date: Wed, 21 Jan 2009 11:20:33 -0600

On Wed, Jan 21, 2009 at 9:41 AM, John W. Eaton <address@hidden> wrote:
The code in Octave that calls mex functions should free all memory
allocated with the mex/mx functions on exit.  Are you sure that the
leak is not in the ipopt code itself?

After calling ipopt, what happens if you clear all variables in the
workspace?

I ran a test. When I start octave, it starts using 30 Megs of RAM. After the end of ipopt call, memory usage by octave is 600 MB. Clearing all the variables with 'clear all' clears the workspace but does'nt flush the memory and octave still uses 600 MB's. So definitely the workspace variables are not using all that memory. Does that indicate a memory leak in ipopt code ? I should also mention, ipopt is also calling sundials toolboox for gradient estimation, which also is a mex call. Sundials has a CVodefree function that is supposed to clear memory used by CVode function, and I am using that function appropriately. So the possibility of Sundials being the culprit is probably less.

Thanks,

Rishi


reply via email to

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