[Gdal-dev] Re: Memory leak under Matlab (a follow up from - importFromWkt() problem)

Mateusz Loskot mateusz at loskot.net
Mon Sep 4 13:00:06 EDT 2006


Joaquim Luis wrote:
> 
>> Another option is to do some simple  tests of memory
>> allocation/deallocation and observe how MATLAB will behave.
>>   
> 
> I tried that and never found a case with a memory leak. All cases that I
> found occur when 3rth party libraries are used by the ML mexs
> (eg. gdal, gmt & opencv).

Joaquim,

That's a bit strange for me, but I'm not a MATLAB user to find
where is the problem.

> That is why I anticipate that the Mathworks support will be difficult to
> convince, and that is also why that I'm trying to build the strongest
> as possible case (or find out what is going on) before contacting them.

That's a good idea.

> For example the following very short peace of code already produces the
> memory leak, but in order to see (in the Windows Task Manager) it
> I have to run the code many times.
> Something like:
> 
> for(i=1:5000);t=test_leak('+proj=longlat');end
> 
> However, in the original code from where this excerpt comes, the leak
> was sufficiently large to be seen only after a couple of executions.
> 
> Is there anyone who could test this on a system other than Windows?

Unfortunately, I'm not.
I can only keep my eyes open and test for possible memory leaks in
the OGR, what I'm definitely going to do.

I'm sorry I was not very helpful in your case.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list