<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 01-10-2013 20:08, Even Rouault wrote:
<blockquote
cite="mid:201310012108.44489.even.rouault@mines-paris.org"
type="cite">
<pre wrap="">Le lundi 30 septembre 2013 00:59:33, Joaquim Luis a écrit :
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
I can make a ticket with this but before, let me just report it here.
- Win 64 bits GDAL build
While playing with an Intel analysis tool to chase GMT memory leaks I
got two complains respecting GDAL.
P1: Error: Kernel resource leak
P1.55: Kernel resource leak: New
c:\programs\gdaltrunk\gdal\port\cpl_multiproc.cpp(626): Error X63:
Critical section creation site: Function CPLCreateMutex: Module
C:\progs_cygw\GMTdev\gmt5\trunk\WIN64\bin\gdal_w64.dll
Code snippet:
624 if( pcs )
625 {
>626 InitializeCriticalSectionAndSpinCount(pcs, 4000);
627 EnterCriticalSection(pcs);
628 }
The MS Help says that this can be solved with a call
to'FindCloseChangeNotification'
</pre>
</blockquote>
<pre wrap="">
MSDN doesn't mention FindCloseChangeNotification as a valid function to call
related to the use of InitializeCriticalSectionAndSpinCount.
Is it really a repeated memory leak (something that will be leaked each time
you call CPLCreateMutex() - with correctly paired CPLDestroyMutex() - and that
will end up exhausting memory / kernel ressources ) or just a one time memory
leak (something that a tool like valgrind would report as 'still reachable' at
the end of the process) due to one of the main "static" GDAL mutex not being
freed ?
</pre>
</blockquote>
<br>
I don't think it is a memory leak but it's the first time I see
this. The description I get from something called "Microsoft Help
Viewer 1.1 '' Catalog VS_100_EN-US" is:<br>
<br>
"Kernel Resource Leak<br>
Occurs when a kernel object handle is created but never closed"<br>
<br>
and it has a table with possible solutions to solve the leak. First
column says "Create Function" and second "Close function"<br>
<br>
<table id="GUID-027652D8-F3E8-4CF9-9100-8C095AFC1A4B" rules="all"
summary="" frame="border" border="1" cellpadding="4"
cellspacing="0" width="100%">
<tbody>
<tr>
<td class="cellrowborder" headers="d65292e121 " valign="top"
width="60%">
<p><span class="option">InitializeCriticalSection</span>, <span
class="option">InitializeCriticalSectionAndSpinCount</span></p>
</td>
<td class="cellrowborder" headers="d65292e124 " valign="top"
width="40%">
<p><span class="option">DeleteCriticalSection</span></p>
</td>
</tr>
</tbody>
</table>
<br>
Sorry if I can't be more useful but as i said this is completely new
to me.<br>
<br>
Joaquim<br>
<br>
</body>
</html>