diff options
author | Andreas Schneider <asn@samba.org> | 2023-03-28 10:17:29 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2023-03-30 07:12:31 +0000 |
commit | 5533ae3be0689de763aa034311a7b12b6fba9775 (patch) | |
tree | 9a7356c5d9c200730e627e2c30006377a4a69947 /lib/talloc | |
parent | 76573d6d8f168d6e6107af26a434b8c71aaf93af (diff) | |
download | samba-5533ae3be0689de763aa034311a7b12b6fba9775.tar.gz |
lib:talloc: Move talloc_get_size() out of the talloc reference group
This is not specific to talloc references.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/talloc')
-rw-r--r-- | lib/talloc/talloc.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h index c466c36406b..711e70bd190 100644 --- a/lib/talloc/talloc.h +++ b/lib/talloc/talloc.h @@ -666,6 +666,19 @@ _PUBLIC_ void *talloc_parent(const void *ptr); _PUBLIC_ const char *talloc_parent_name(const void *ptr); /** + * @brief Get the size of a talloc chunk. + * + * This function lets you know the amount of memory allocated so far by + * this context. It does NOT account for subcontext memory. + * This can be used to calculate the size of an array. + * + * @param[in] ctx The talloc chunk. + * + * @return The size of the talloc chunk. + */ +_PUBLIC_ size_t talloc_get_size(const void *ctx); + +/** * @brief Get the total size of a talloc chunk including its children. * * The function returns the total size in bytes used by this pointer and all @@ -1071,19 +1084,6 @@ _PUBLIC_ int talloc_unlink(const void *context, void *ptr); _PUBLIC_ void *talloc_autofree_context(void) _DEPRECATED_; /** - * @brief Get the size of a talloc chunk. - * - * This function lets you know the amount of memory allocated so far by - * this context. It does NOT account for subcontext memory. - * This can be used to calculate the size of an array. - * - * @param[in] ctx The talloc chunk. - * - * @return The size of the talloc chunk. - */ -_PUBLIC_ size_t talloc_get_size(const void *ctx); - -/** * @brief Show the parentage of a context. * * @param[in] context The talloc context to look at. |