Add memory limiting capability to talloc
authorSimo Sorce <idra@samba.org>
Sat, 22 Sep 2012 20:15:47 +0000 (16:15 -0400)
committerSimo Sorce <idra@samba.org>
Fri, 5 Oct 2012 03:57:17 +0000 (05:57 +0200)
commita33a78c302fde61fdb7a6e71669f19be2cf5c836
treec6b06de88fe07acf5999be3f1d24884827a44fb1
parent78594909b8b22bd07978922b1c85dfd6f6456963
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.
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