summaryrefslogtreecommitdiff
path: root/talloc_guide.txt
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-29 06:31:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:29 -0500
commit4f13ebef5d6711ac121b9c41e2fbbe2cd3b6da0e (patch)
tree9c97145fdcde8e5e7d9d2736b0571caae530db7e /talloc_guide.txt
parent173b61817b23c7338a30cae819cc63879543587f (diff)
downloadsamba-4f13ebef5d6711ac121b9c41e2fbbe2cd3b6da0e.tar.gz
samba-4f13ebef5d6711ac121b9c41e2fbbe2cd3b6da0e.tar.bz2
samba-4f13ebef5d6711ac121b9c41e2fbbe2cd3b6da0e.zip
r2744: ben elliston taught me about gcov today, which allows you to measure
the % coverage in terms of lines of code of a test suite. I thought a good first place to start with gcov was the talloc test suite. When I started the test suite covered about 60% of all lines of code in talloc.c, and now it covers about 99%. The only lines not covered are talloc corruption errors, as that would cause smb_panic() to fire. It will be interesting to try gcov on the main Samba test suite for smbd. We won't achieve 100% coverage, but it would be nice to get to 90% or more. I also modified the talloc.c sources to be able to be build standalone, using: gcc -c -D_STANDALONE_ -Iinlcude lib/talloc.c that should make it much easier to re-use talloc in other projects (This used to be commit 8d4dc99b82efdf24b6811851c7bdd4af5a4c52c9)
Diffstat (limited to 'talloc_guide.txt')
-rw-r--r--talloc_guide.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/talloc_guide.txt b/talloc_guide.txt
index 7d727c5cb2..745426730c 100644
--- a/talloc_guide.txt
+++ b/talloc_guide.txt
@@ -125,7 +125,9 @@ After creating a reference you can free it in one of the following
ways:
- you can talloc_free() a parent of the original pointer. That will
- destroy the reference and make the pointer a child of "context".
+ destroy the reference and make the pointer a child of the
+ "context" argument from the most recently called
+ talloc_reference() on the pointer.
- you can talloc_free() the pointer itself. That will destroy the
most recently established reference to the pointer and leave the