Add memory limiting capability to talloc
authorSimo Sorce <idra@samba.org>
Sat, 22 Sep 2012 20:15:47 +0000 (16:15 -0400)
committerStefan Metzmacher <metze@samba.org>
Tue, 10 Mar 2015 09:55:34 +0000 (10:55 +0100)
commit37ebf499ec5804f456d48ea3a46770a91e9dac7c
treea27f047b2deb73753128c2fa81dbe30a48889ccf
parent594e911269c81b4c810864ee69dc9cc6eee2f32b
Add memory limiting capability to talloc

By calling talloc_set_memlimit() we can now set a max memory limit
for a whole talloc hierarchy.
ANy attempt to allocate memory beyond the max allowed for the whole
hierarchy wil cause an allocation failure.

Stealing memory correctly accounts for used memory in the old and the new
hierarchy but exceeding the memory limit in the new parent will not cause
a failure.

(cherry picked from commit a33a78c302fde61fdb7a6e71669f19be2cf5c836)
lib/talloc/ABI/pytalloc-util-2.0.8.sigs [new file with mode: 0644]
lib/talloc/ABI/talloc-2.0.8.sigs [new file with mode: 0644]
lib/talloc/talloc.c
lib/talloc/talloc.h
lib/talloc/wscript