- 03 Jan, 2013 2 commits
-
-
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>
-
- 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 27 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>
-
Rusty Russell authored
ccanlint would abort with 'Malformed line 53' if there was a bad header. That's very poor, and deeply unhelpful. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 22 Nov, 2012 8 commits
-
-
Rusty Russell authored
We need ccan/take here. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Header from folded patch 'path-talloc-take.patch': tal/path: accept take() for arguments. 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
Tal-enhanced string routines, copied from str_talloc (which I also wrote). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Our first nested module; easy because noone else relies on it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Removing this assumption should allow nested modules. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-