summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-memory.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-03-15 04:25:09 +0000
committerHavoc Pennington <hp@redhat.com>2003-03-15 04:25:09 +0000
commit169238e99a4a163c89eb053250daeedf5f73e5cd (patch)
tree4b8f9af81765077fd9a227bae974924d905f182f /dbus/dbus-memory.c
parent4c95a9782c65f88e2904c44abeb734a1b00f6353 (diff)
2003-03-14 Havoc Pennington <hp@pobox.com>
* bus/dispatch.c (bus_dispatch_test): do test using debug-pipe transport, tests more of the real codepath. Set up clients with bus_setup_debug_client. * bus/test.c (bus_setup_debug_client): function to set up debug "clients" on the main loop * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe support * dbus/dbus-server.c (dbus_server_listen): add debug-pipe server type * dbus/dbus-server-debug.c: support a debug server based on pipes * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function (_dbus_close): new function * configure.in: check for socketpair
Diffstat (limited to 'dbus/dbus-memory.c')
-rw-r--r--dbus/dbus-memory.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/dbus/dbus-memory.c b/dbus/dbus-memory.c
index 5f0d9b8e..83d17e6c 100644
--- a/dbus/dbus-memory.c
+++ b/dbus/dbus-memory.c
@@ -77,11 +77,17 @@ static dbus_bool_t inited = FALSE;
static int fail_counts = -1;
static size_t fail_size = 0;
static dbus_bool_t guards = FALSE;
+/** value stored in guard padding for debugging buffer overrun */
#define GUARD_VALUE 0xdeadbeef
+/** size of the information about the block stored in guard mode */
#define GUARD_INFO_SIZE 8
+/** size of the GUARD_VALUE-filled padding after the header info */
#define GUARD_START_PAD 16
+/** size of the GUARD_VALUE-filled padding at the end of the block */
#define GUARD_END_PAD 16
+/** size of stuff at start of block */
#define GUARD_START_OFFSET (GUARD_START_PAD + GUARD_INFO_SIZE)
+/** total extra size over the requested allocation for guard stuff */
#define GUARD_EXTRA_SIZE (GUARD_START_OFFSET + GUARD_END_PAD)
#endif
@@ -107,6 +113,9 @@ initialize_malloc_debug (void)
}
}
+/**
+ * Where the block came from.
+ */
typedef enum
{
SOURCE_UNKNOWN,