From bfad32422f1f78bce4de1e88a4afb5cc295bb877 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 20 May 2009 01:32:46 +0200 Subject: unix-fd: add logic to count unix fds the same way as allocated memory This make all counters count both bytes of memory and unix fds. --- dbus/dbus-message-private.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dbus/dbus-message-private.h') diff --git a/dbus/dbus-message-private.h b/dbus/dbus-message-private.h index 1e8b107a..03257a9b 100644 --- a/dbus/dbus-message-private.h +++ b/dbus/dbus-message-private.h @@ -112,7 +112,7 @@ struct DBusMessage unsigned int in_cache : 1; /**< Has been "freed" since it's in the cache (this is a debug feature) */ #endif - DBusList *size_counters; /**< 0-N DBusCounter used to track message size. */ + DBusList *counters; /**< 0-N DBusCounter used to track message size/unix fds. */ long size_counter_delta; /**< Size we incremented the size counters by. */ dbus_uint32_t changed_stamp : CHANGED_STAMP_BITS; /**< Incremented when iterators are invalidated. */ @@ -130,6 +130,8 @@ struct DBusMessage them when adding or removing them here. */ unsigned n_unix_fds; /**< Number of valid fds in the array */ unsigned n_unix_fds_allocated; /**< Allocated size of the array */ + + long unix_fd_counter_delta; /**< Size we incremented the unix fd counter by */ #endif }; -- cgit