- 02 Feb, 2013 2 commits
-
-
Rusty Russell authored
-
Riceball LEE authored
-
- 25 Jan, 2013 3 commits
-
-
Ulrik Sverdrup authored
-
Ulrik Sverdrup authored
-
Ulrik Sverdrup authored
7 in ~7 needs to be size_t for it to be correct when len > INT_MAX.
-
- 14 Jan, 2013 5 commits
-
-
Ulrik Sverdrup authored
-
Ulrik Sverdrup authored
A simple implementation compiles very well with gcc and clang on ppc and x86, and will handle any-aligned input.
-
Ulrik Sverdrup authored
-
Rusty Russell authored
"engla" on IRC reported that ccanlint on linux/powerpc would loop infinitely calling dep_failed after all tests are run and the score is output. Reproduced, and discovered that cannot_run() takes a container_of(), except our top node is not a struct ccanlint. The result was harmless on x86, but set dep_failed to the return address on powerpc, causing that to be called repeatedly. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
This is good form for datastructures, so caller can track weird bugs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 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 15 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>
-