talloc callbacks

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Apr 15 02:58:21 MDT 2013


On Mon, Apr 15, 2013 at 11:50:03AM +0300, Андрей Аладьев wrote:
> I want to know how talloc tree is changing below the node with
> callbacks. For example:
> 
> TALLOC_CTX * root = talloc_new ( NULL );
> talloc_set_callback_fn(root, add, del);
> 
> char * c  = talloc(root, char); // add callback execution
> short * s = talloc(c, short); // add callback execution
> int * i   = talloc(c, int); // add callback execution
> long * l  = talloc(i, long); // add callback execution
> 
> talloc_steal(...) // del callback and add callback
> 
> talloc_free(root); // del callback execution 4 times

Yes, I understand that. I want to understand your
higher-level goals. Is this for statistics only, do you want
to tie functionality to the callbacks, what do you want to
achieve here?

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list