]> git.ozlabs.org Git - ccan/blobdiff - ccan/tal/benchmark/samba-allocs.c
ccan/tal: always include a length field.
[ccan] / ccan / tal / benchmark / samba-allocs.c
index f2259a4e3d54fc41655a73dc8cd3cebd48058895..4bed1b2a211cbd56b8849c447ba4a61d81367884 100644 (file)
@@ -178,15 +178,8 @@ static void do_tals(struct node *node)
        unsigned int i;
        static int count;
 
-       /* Tal pays a penalty for arrays, but we can't tell which is an array
-        * and which isn't.  Grepping samba source gives 1221 talloc_array of
-        * 33137 talloc occurrences, so conservatively assume 1 in 16 */
-       if (count++ % 16 == 0)
-               node->n = tal_arr(node->parent ? node->parent->n : NULL,
-                                 char, node->len);
-       else
-               node->n = tal_alloc_(node->parent ? node->parent->n : NULL,
-                                    node->len, false, false, TAL_LABEL(type, ""));
+       node->n = tal_arr(node->parent ? node->parent->n : NULL,
+                         char, node->len);
 
        if (node->destructor)
                tal_add_destructor(node->n, unused_tal_destructor);