diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-04-02 18:18:53 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-02 18:52:29 +1100 |
commit | fde50c633f3a48c8e63718903a77e2c1ecc12a55 (patch) | |
tree | 85992617030185fbad5f3ca157d6be4424eefc17 /lib | |
parent | 1b4bbec523f2bf20d91c177e7fdb4b7f87431926 (diff) | |
download | samba-fde50c633f3a48c8e63718903a77e2c1ecc12a55.tar.gz samba-fde50c633f3a48c8e63718903a77e2c1ecc12a55.tar.bz2 samba-fde50c633f3a48c8e63718903a77e2c1ecc12a55.zip |
talloc: a useful bit of debug code
this is useful when tracking down talloc loops. It is probably too
expensive to have on by default.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/talloc/talloc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index 51273dd612..bc1c697789 100644 --- a/lib/talloc/talloc.c +++ b/lib/talloc/talloc.c @@ -754,6 +754,14 @@ void *_talloc_steal_loc(const void *new_ctx, const void *ptr, const char *locati h->location); } } + +#if 0 + /* this test is probably too expensive to have on in the + normal build, but it useful for debugging */ + if (talloc_is_parent(new_ctx, ptr)) { + talloc_log("WARNING: stealing into talloc child at %s\n", location); + } +#endif return _talloc_steal_internal(new_ctx, ptr); } |