diff options
author | Jeremy Allison <jra@samba.org> | 2013-08-27 13:08:33 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-08-27 15:44:20 -0700 |
commit | 3d0f717d437bb24f430fad788b9eb35e8fe8e0e8 (patch) | |
tree | a2b9021560815e95d92636193e072798dac4fac8 | |
parent | 8e2a543e088cac36a5b6bbab1a6be961fa00cc4d (diff) | |
download | samba-3d0f717d437bb24f430fad788b9eb35e8fe8e0e8.tar.gz samba-3d0f717d437bb24f430fad788b9eb35e8fe8e0e8.tar.bz2 samba-3d0f717d437bb24f430fad788b9eb35e8fe8e0e8.zip |
Remove talloc_memlimit_update(). No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
-rw-r--r-- | lib/talloc/talloc.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index 66ac110eeb..677ec0f13f 100644 --- a/lib/talloc/talloc.c +++ b/lib/talloc/talloc.c @@ -236,8 +236,6 @@ struct talloc_memlimit { }; static bool talloc_memlimit_check(struct talloc_memlimit *limit, size_t size); -static bool talloc_memlimit_update(struct talloc_memlimit *limit, - size_t old_size, size_t new_size); static void talloc_memlimit_grow(struct talloc_memlimit *limit, size_t size); static void talloc_memlimit_shrink(struct talloc_memlimit *limit, @@ -2612,28 +2610,6 @@ static void talloc_memlimit_shrink(struct talloc_memlimit *limit, } } -static bool talloc_memlimit_update(struct talloc_memlimit *limit, - size_t old_size, size_t new_size) -{ - struct talloc_memlimit *l; - ssize_t d; - - if (old_size == 0) { - d = new_size + TC_HDR_SIZE; - } else { - d = new_size - old_size; - } - for (l = limit; l != NULL; l = l->upper) { - ssize_t new_cur_size = l->cur_size + d; - if (new_cur_size < 0) { - return false; - } - l->cur_size = new_cur_size; - } - - return true; -} - _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) { struct talloc_chunk *tc = talloc_chunk_from_ptr(ctx); |