talloc callbacks

Андрей Аладьев aladjev.andrew at gmail.com
Mon Apr 15 03:53:23 MDT 2013


Absolutely. I want to implement (or just a try) interactive memory
visualization in twopi-like layout, charts, etc

2013/4/15 Volker Lendecke <Volker.Lendecke at sernet.de>:
> 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