Age | Commit message (Collapse) | Author | Files | Lines |
|
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 59757c7f9d0e08e3acacfb3116f6205057d5b119)
|
|
deferred reply is short-circuited immediately when the file is
closed by another user, allowing it to be opened by the waiting user.
- added a sane set of timeval manipulation routines
- converted all the events code and code that uses it to use struct
timeval instead of time_t, which allows for microsecond resolution
instead of 1 second resolution. This was needed for doing the pvfs
deferred open code, and is why the patch is so big.
(This used to be commit 0d51511d408d91eb5f68a35e980e0875299b1831)
|
|
(This used to be commit 7067bb9b52223cafa28470f264f0b60646a07a01)
|
|
(This used to be commit 5045482b14dfcbb535eab3e5fa63ef1c3b46c40f)
|
|
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 6c563887f1b9b8c842309a523e88b6f2a32db10f)
|
|
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)
|
|
- made the LOCAL-TALLOC smbtorture test much stricter, checking that
block counts for every pointer are correct after every operation
(This used to be commit 18d3e2647f0bedbba699d1ba2649c0cfe4526ef6)
|
|
- added documentation for talloc_unreference()
- made the abandoned child logic in talloc_free() clearer and more consistent
(This used to be commit a87584c8e3fb06cd3ff29a918f681b5c6c32b9ff)
|
|
MEASURING TALLOC VS MALLOC SPEED
talloc: 279154 ops/sec
malloc: 318758 ops/sec
which I think is an acceptable overhead for the increased functionality
(This used to be commit 91669ea830c16db2730c5e43a7cad26d9db5c585)
|
|
The problem was that the simple "uint_t ref_count;" in a talloc chunk
did not give enough information. It told us that a pointer was
referenced more than once, but it didn't say who it was referenced
by. This means that when the pointer was freed we had no sane way to
clean up the reference.
I have now replaced ref_count with a "refs" list, which means that
references point to the pointer, and the pointer has a linked list of
references. So now we can cleanup from either direction without losing track of anything.
I've also added a LOCAL-TALLOC smbtorture test that tests talloc
behaviour for some common uses.
(This used to be commit 911a8d590cb184bcb892810729955c2c4cf02550)
|