Lines Matching refs:talloc
1 Using talloc in Samba4
8 http://samba.org/ftp/unpacked/samba4/source/lib/talloc/talloc_guide.txt
10 If you are used to talloc from Samba3 then please read this carefully,
11 as talloc has changed a lot.
13 The new talloc is a hierarchical, reference counted memory pool system
18 between a "talloc context" and a "talloc pointer". Any pointer
19 returned from talloc() is itself a valid talloc context. This means
22 struct foo *X = talloc(mem_ctx, struct foo);
25 and the pointer X->name would be a "child" of the talloc context "X"
36 watch talloc in action. You may also like to add your own tests to
43 All the additional features of talloc() over malloc() do come at a
45 talloc() versus malloc() performance, and it seems that talloc() is
47 the great reduction in code complexity that we get by using talloc
49 talloc/malloc in Samba is already quite small.
52 talloc API
55 The following is a complete guide to the talloc API. Read it all at
60 (type *)talloc(const void *context, type);
62 The talloc() macro is the core of the talloc library. It takes a
66 The returned pointer is itself a talloc context, so you can use it as
67 the context argument to more calls to talloc if you wish.
73 The context argument to talloc() can be NULL, in which case a new top
81 convenient type to pass to talloc(). Unlike talloc(), it is not type
88 The talloc_free() function frees a piece of talloc memory, and all its
90 talloc().
112 talloc context and talloc_free()s only the children, not the context
123 "ptr", unless talloc ran out of memory in creating the reference in
200 Each talloc pointer has a "name". The name is used principally for
204 The main use for names on pointer is for "talloc reports". See
225 supplied pointer into the internal representation of the talloc
233 The talloc_named() function creates a named talloc pointer. It is
252 This returns the current name for the given talloc pointer. See
259 This function creates a zero length named talloc context as a top
277 The talloc_realloc() macro changes the size of a talloc
283 talloc_realloc(context, NULL, type, 1) ==> talloc(context, type);
305 The talloc_steal() function changes the parent context of a talloc
377 talloc function as it establishes a "null context" that acts as the
382 Here is a typical talloc report:
384 talloc report on 'null_context' (total 267 bytes in 15 blocks)
402 talloc function as it establishes a "null context" that acts as the
409 full talloc report on 'root' (total 18 bytes in 8 blocks)
432 ptr = talloc(ctx, type);
466 The talloc_strndup() function is the talloc equivalent of the C
477 The talloc_vasprintf() function is the talloc equivalent of the C
484 The talloc_asprintf() function is the talloc equivalent of the C
531 This is a handy utility function that returns a talloc context
546 This macro allows you to do type checking on talloc pointers. It is