And as far as I understand leak is somewhere in driver code, not c library.<div><br></div><div>Btw, maybe it is possible to pass some port id to driver_alloc for measuring, what instance is leaking?</div><div><br></div><div>Driver_alloc(size, port_instance_id)<br><br><br>On Thursday, November 12, 2015, Lukas Larsson <<a href="mailto:garazdawi@gmail.com">garazdawi@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Since it is instance 0, it will most likely be someone that does not run in a scheduler thread. eg async thread or nif thread.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 11, 2015 at 7:55 PM, Max Lapshin <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','max.lapshin@gmail.com');" target="_blank">max.lapshin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Just for a reminder:</div><div class="gmail_extra"><br></div><div class="gmail_extra">
<p><span>[case A of {driver_alloc,_} -> Calls = proplists:get_value(calls,I), {_,_,M} = lists:keyfind(driver_alloc,1,Calls),{_,_,F} = lists:keyfind(driver_free,1,Calls), io:format("~p ~p\n", [A, M-F]); _ -> ok end|| {A,I} <- recon_alloc:allocators()].</span></p><p><span><br></span></p><p><span>shows something like:</span></p><p><span><br></span></p><p><span>{driver_alloc,0} 125581808</span></p><p><span>{driver_alloc,1} 313</span></p><p><span>{driver_alloc,2} 280</span></p><p><span>{driver_alloc,3} 131</span></p><p><span>{driver_alloc,4} -52</span></p><p><span>
</span></p><p><span>{driver_alloc,5} -152</span></p><p><span>...</span></p><p><span><br></span></p><p><span><br></span></p><p>Now need only to find out, who is mallocing without free</p></div></div>
</blockquote></div><br></div>
</blockquote></div>