- 12 Jan, 2013 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 03 Jan, 2013 5 commits
-
-
Rusty Russell authored
-
Rusty Russell authored
We use TAL_USE_TALLOC to use libtalloc as the backend: you can test that with ccanlint --compiler="cc -DTAL_USE_TALLOC". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
We can't really tell if non-ccan dependencies are used, so don't try. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
David Gibson points out that a project may already be using talloc, so this gives a simple adapter if one module uses tal. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 17 Dec, 2012 3 commits
-
-
Rusty Russell authored
It may interfere with other at_exit() calls, so let them call it manually. Also, use memset to zero, which really does make valgrind notice any leaks. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
In this case, CCAN_CFLAGS should be "". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Since we never post-add a length property, we can save some cycles by allocating it together with the object itself: Before: $ ./samba-allocs talloc.dump --tal Tal time: 6058997-6215211(6102645)ns Tal_free time: 4791112-4968964(4824814)ns Single tal_free time: 3173647-3331584(3200183)ns $ ./samba-allocs talloc.dump --tal-size Virtual size = 9809920, RSS = 3952640 After: $ ./samba-allocs talloc.dump --tal Tal time: 5911994-6043808(5956914)ns Tal_free time: 4676026-4834598(4719908)ns Single tal_free time: 2888195-3067365(2922298)ns $ ./samba-allocs talloc.dump --tal-size Virtual size = 9809920, RSS = 3948544 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 14 Dec, 2012 3 commits
-
-
Rusty Russell authored
Since we added the length property, this penalizes us with an extra alloc. Unfortunately, we can't tell from the talloc.dump which are array tallocs and which are single tallocs, but grepping the sources gives a rate of 1 in 27. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 07 Dec, 2012 3 commits
-
-
Rusty Russell authored
The first ok() line was actually failing, because sigaction returns 0 on success, but because the program exit(0) out the abort handler, that wasn't being seen. So remove tap and just abort and assert our way through the test, which I think is clearer. We use macros to mug the talloc entry points, since talloc_set_allocator() is not in mainline talloc. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Now it's a useful little command line utility, with tests. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
We weren't using the compiler and cflags options in tools/compile. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 03 Dec, 2012 25 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
We can use tal_count. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
eg: tal/str: Module's tests cover all the code (tests_coverage): PASS (+3/6) tal/str: Total score: 55/58 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Slowly removing the talloc dependency. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Tests and example copied from talloc_link, which I also wrote. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
They are far too convenient, despite their inefficiency. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Shorter, sweeter, and less legacy. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Useful for joining two strings. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Helper to reallocate and append to an array. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
They don't need anything internal to tal, they're just helpers. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
It's short, and much clearer. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Unlike talloc, we don't have a count on everything, just on array allocations. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
You don't need write access to the context to attach a destructor; it's meta. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
$ for i in `seq 10`; do ./samba-allocs talloc.dump --tal; done | stats.c --trim-outliers Before: Read 25998 nodes Tal time: 2857988-2981158(2904324)ns Tal_free time: 2417170-2582088(2470931)ns Single tal_free time: 1551654-1609583(1575984)ns After: Read 25998 nodes Tal time: 2780974-2901323(2839352)ns Tal_free time: 2241725-2355309(2285165)ns Single tal_free time: 1549908-1612485(1566609)ns Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
We sanity check tal headers by ensuring that the pointers are in the bounds of things we've allocated. But the first one we check is the prop ptr, which may also be a literal: this is_literal() dereferences the pointer, which means we usually crash here if it's not a tal object. Move that last, and we have far more success with our sanity checking. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
All the effort trying to keep the header size down to 2 pointers turns out to be wasted. In addition, getting the parent of a tal pointer is now much faster. ./samba-allocs talloc.dump --tal-size: Before: Virtual size = 9633792, RSS = 3952640 After: Virtual size = 9793536, RSS = 3948544 And we're much faster now, esp. on free. ./samba-allocs talloc.dump --tal: Before: Tal time: 2718068ns Tal_free time: 3360258ns Single tal_free time: 1667412ns After: Tal time: 2788287ns Tal_free time: 2290167ns Single tal_free time: 1566998ns Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Header from folded patch 'tal-fix-set-destroying-bit.patch': tal: fix destroying bit usage. Actually looking at a destroying contexts' parent didn't work, and a couple of places didn't filter out the destroying bit. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
If we see an ccan include line in an example, we add that to the dependencies to try to build the example, but we didn't handle nested modules. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-