diff options
author | David Disseldorp <ddiss@samba.org> | 2018-10-16 19:06:48 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2018-10-19 23:11:26 +0200 |
commit | 9e03fb60dca0ebafa8bf8095d6e21659bdf453ee (patch) | |
tree | cf73ec8b4f6edff2b1f340625b353f198a6b89d4 /lib/talloc | |
parent | 5b2c3f2f422f4f99036e9584a0fd398a30c8618a (diff) | |
download | samba-9e03fb60dca0ebafa8bf8095d6e21659bdf453ee.tar.gz |
talloc: deprecate talloc_set_memlimit()
The memlimit functionality was never utilized by Samba. It adds unneeded
complexity, so flag it as deprecated.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/talloc')
-rw-r--r-- | lib/talloc/talloc.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h index 7372df16fe8..ba3dee8de97 100644 --- a/lib/talloc/talloc.h +++ b/lib/talloc/talloc.h @@ -1893,6 +1893,13 @@ void talloc_set_log_fn(void (*log_fn)(const char *message)); */ void talloc_set_log_stderr(void); +#ifndef _DEPRECATED_ +#ifdef HAVE___ATTRIBUTE__ +#define _DEPRECATED_ __attribute__ ((deprecated)) +#else +#define _DEPRECATED_ +#endif +#endif /** * @brief Set a max memory limit for the current context hierarchy * This affects all children of this context and constrain any @@ -1907,10 +1914,13 @@ void talloc_set_log_stderr(void); * move causes the new parent to exceed its limits. However * any further allocation on that hierarchy will then fail. * + * @warning talloc memlimit functionality is deprecated. Please + * consider using cgroup memory limits instead. + * * @param[in] ctx The talloc context to set the limit on * @param[in] max_size The (new) max_size */ -int talloc_set_memlimit(const void *ctx, size_t max_size); +int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_; /* @} ******************************************************************/ |