1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

12 Commits

Author SHA1 Message Date
Andrew Bartlett
438a54b8b4 r3553: Allow talloc_reference to take a NULL pointer for the "ptr" argument.
This allows potentially NULL pointers to be referenced, without an if ()
for every use.  (previously, it would segfault).

Update doco, and allow talloc_unlink to match.

Andrew Bartlett
(This used to be commit 59757c7f9d)
2007-10-10 13:05:31 -05:00
Andrew Tridgell
e78bfc9603 r3366: updates from the junkcode version of talloc.
The main change is to get rid of talloc_parent_chunk() from all
commonly used code paths, so talloc_free() is now O(1) again. It was
originally O(1), but the last round of changes broke that.

Also some documentation updates
(This used to be commit d4fe21cdb9)
2007-10-10 13:05:01 -05:00
Andrew Tridgell
1429ed54f1 r2792: got rid of talloc_ldb_alloc() and instead created talloc_realloc_fn(),
so talloc now doesn't contain any ldb specific functions.

allow NULL to be passed to a couple more talloc() functions
(This used to be commit 1246f80d80)
2007-10-10 12:59:34 -05:00
Andrew Tridgell
15b9736ed3 r2791: got rid of talloc_unreference() and instead created talloc_unlink(),
which is much clearer and simpler to use. It removes a specific parent
from a pointer, no matter whether that parent is a "reference" or a
direct parent. This gives complete control over the free process.
(This used to be commit 6c563887f1)
2007-10-10 12:59:34 -05:00
Andrew Tridgell
e0aeffbc85 r2745: added some example talloc reports
(This used to be commit 10e2a4fd2b)
2007-10-10 12:59:29 -05:00
Andrew Tridgell
4f13ebef5d 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 8d4dc99b82)
2007-10-10 12:59:29 -05:00
Andrew Tridgell
173b61817b r2743: fixed some errors in the description of talloc_reference(). Volker
told me he found the description confusing, and given that some of it
was not correct I am not surprised!

added some more docs on the reporting calls
(This used to be commit 43079cfc80)
2007-10-10 12:59:29 -05:00
Andrew Tridgell
a93e366379 r2733: added a note on performance
(This used to be commit 171fe82097)
2007-10-10 12:59:27 -05:00
Andrew Tridgell
4ff5ffa4a0 r2719: an additional note on talloc_unreference()
(This used to be commit 078d131813)
2007-10-10 12:59:26 -05:00
Andrew Tridgell
8ae2cd82ca r2718: - added a talloc_unreference() function as requested by metze.
- added documentation for talloc_unreference()

- made the abandoned child logic in talloc_free() clearer and more consistent
(This used to be commit a87584c8e3)
2007-10-10 12:59:26 -05:00
Andrew Tridgell
0a93af206c r2717: added talloc_p() docs
(This used to be commit 6743ca1b1a)
2007-10-10 12:59:25 -05:00
Andrew Tridgell
864abe0e45 r2716: created a separate detailed talloc_guide.txt document, after volker
complained it was all too confusing :-)

I recommend that everyone who wants to work on Samba4 have a read of this.
(This used to be commit c4c427576c)
2007-10-10 12:59:25 -05:00