git: udevd - Big memory and thread cleanup
alexh at crater.dragonflybsd.org
Sat Jul 17 02:00:03 PDT 2010
Author: Alex Hornung <ahornung at 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)
* 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
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(-)
DragonFly BSD source repository
More information about the Commits