diff options
Diffstat (limited to 'source3/lib/talloc.c')
-rw-r--r-- | source3/lib/talloc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index da3a2300b0..4aeac5fef2 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -1081,4 +1081,13 @@ void *talloc_autofree_context(void) return cleanup_context; } +size_t talloc_get_size(const void *context) { + struct talloc_chunk *tc; + + if (context == NULL) + return 0; + tc = talloc_chunk_from_ptr(context); + + return tc->size; +} |