<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><span id="zwchr" data-marker="__DIVIDER__">----- On Jun 22, 2016, at 6:26 AM, Денис Корешков <dynamic-wind@mail.ru> wrote:<br></span></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">Hello,<br>there's a small memory leak in the rculfhash observed under FreeBSD-10 when destroying a table. <br>The line<br>pthread_mutex_init(&ht->resize_mutex, NULL);<br>actually calloc's some memory for resize_mutex, and there should be a call to pthread_mutex_destroy(3) in cds_lfht_destroy to free it. There's no such call in the latest (0.9.2) Userspace RCU.<br>Cheers!</blockquote><div>Hi,<br></div><div><br data-mce-bogus="1"></div><div>Thanks for letting me know! It appears that Linux don't allocate</div><div>memory for those,which might be why I never stumbled on those</div><div>issues.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>I just pushed the following string of commits, also taking care of<br data-mce-bogus="1"></div><div>similar issues with wfcqueue, wfqueue, wfstack and lfstack APIs.<br data-mce-bogus="1"></div><div>I add to add new "destroy" API to those to handle this.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>commit 2af1c19e6a553878fcb2a5106f050d5ed7ac0f54<br>Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com><br>Date: Wed Jun 22 16:21:43 2016 -0400<br><br> Fix: tests: invoke destroy APIs for queues/stacks<br> <br> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com><br><br>commit 200d100e05ed8e10c47f971939042f2406df92ef<br>Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com><br>Date: Wed Jun 22 16:20:25 2016 -0400<br><br> Fix: add missing destroy functions to queues/stack APIs<br> <br> Queues and stack APIs that invoke pthread_mutex_init() should have a<br> "destroy" counterpart which calls pthread_mutex_destroy(), ortherwise<br> this causes small memory leaks on platforms where pthread_mutex_init<br> performs memory allocation.<br> <br> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com><br><br>commit b4edfa8157bb45827c3236809e550b4d13c0ae22<br>Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com><br>Date: Wed Jun 22 16:17:37 2016 -0400<br><br> Fix: add missing __cds_wfcq_init for LGPL API<br> <br> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com><br><br>commit 59629f09c1ee8395b1e22797a6924703e825e345<br>Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com><br>Date: Wed Jun 22 15:50:21 2016 -0400<br><br> Fix: memory leak on hash table destroy<br> <br> There is a missing call to pthread_mutex_destroy(3) to match<br> pthread_mutex_init(3) in the hash table creation.<br> <br> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com><br></div><div><br data-mce-bogus="1"></div><div>Thanks,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Mathieu<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><br><br>_______________________________________________<br>lttng-dev mailing list<br>lttng-dev@lists.lttng.org<br>https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev<br></blockquote></div><div><br></div><div data-marker="__SIG_POST__">-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com</div></div></body></html>