DragonFly commits List (threaded) for 2010-07
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
git: udevd - Big memory and thread cleanup
commit 9ff03f9eb1c21e740304584fcbb2acbd3ca5d766
Author: Alex Hornung <ahornung@gmail.com>
Date: Sat Jul 17 09:49:20 2010 +0100
udevd - Big memory and thread cleanup
* Adjust read_xml() to allocate just the right size of memory, so we
don't waste anything by allocating 12 MB per client, when the usual
client xml is a few kB.
* Detach threads so that they can free resources whenever they return
from their startup function.
* Release the memory associated with a particular iterator and with some
of the fields in the event filters, which were previously leaking.
* Let the monitor thread check every few (2) seconds if the underlying
connection is still alive. Previously the threads were staying around
even after the connection was closed when no event (attach/detach)
occured.
* Clean up the pdev array on a clean exit so it's easier to find memory
leaks, since the amount of allocations done by proplib on behalf of
the pdev stuff is huge.
* Incidentally, don't forget to update the pdev array when a device is
detached.
Reported-by: Antonio Huete (tuxillo@)
Summary of changes:
sbin/udevd/udevd.c | 3 ++-
sbin/udevd/udevd.h | 3 ++-
sbin/udevd/udevd_client.c | 11 ++++++++---
sbin/udevd/udevd_monitor.c | 34 ++++++++++++++++++++++++++++++----
sbin/udevd/udevd_pdev.c | 12 ++++++++++++
sbin/udevd/udevd_socket.c | 17 ++++++++++++-----
6 files changed, 66 insertions(+), 14 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9ff03f9eb1c21e740304584fcbb2acbd3ca5d766
--
DragonFly BSD source repository
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]