diff options
author | Jeremy Allison <jra@samba.org> | 2013-08-27 13:08:33 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2015-03-15 22:14:07 +0100 |
commit | 18e14d6a3e87546e1f736ad8ac94209096a490a8 (patch) | |
tree | ef96a018f2009001643762f58cb438a95787d283 | |
parent | cf58b4307ccdb9c496dccce9c4198c1374cf62b8 (diff) | |
download | samba-18e14d6a3e87546e1f736ad8ac94209096a490a8.tar.gz |
Remove talloc_memlimit_update(). No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit 3d0f717d437bb24f430fad788b9eb35e8fe8e0e8)
-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 66ac110eeb5..677ec0f13fd 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); |