diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-17 02:52:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:55 -0500 |
commit | 6717dcca765e5286a36d89eebc5da2d167bcbef2 (patch) | |
tree | 0b7e264da565ebca76cc22c71f02251e886e2658 /source4 | |
parent | 48e07444e834f277665ac2010bd24b0fdc74194a (diff) | |
download | samba-6717dcca765e5286a36d89eebc5da2d167bcbef2.tar.gz samba-6717dcca765e5286a36d89eebc5da2d167bcbef2.tar.bz2 samba-6717dcca765e5286a36d89eebc5da2d167bcbef2.zip |
r4793: minor doc updates
(This used to be commit ad1af519eb1a138e44cc94676f845b8ba65e3371)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/talloc/talloc_guide.txt | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/source4/lib/talloc/talloc_guide.txt b/source4/lib/talloc/talloc_guide.txt index 927bd366fd..eae6c5e564 100644 --- a/source4/lib/talloc/talloc_guide.txt +++ b/source4/lib/talloc/talloc_guide.txt @@ -32,10 +32,9 @@ If you think about this, then what this effectively gives you is an n-ary tree, where you can free any part of the tree with talloc_free(). -If you find this confusing, then I suggest you run the LOCAL-TALLOC -smbtorture test to watch talloc in action. You may also like to add -your own tests to source/lib/talloc/testsuite.c to clarify how some -particular situation is handled. +If you find this confusing, then I suggest you run the testsuite to +watch talloc in action. You may also like to add your own tests to +testsuite.c to clarify how some particular situation is handled. Performance @@ -74,6 +73,7 @@ well. Alternatively you can free just the child. The context argument to talloc() can be NULL, in which case a new top level context is created. + =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- void *talloc_size(const void *context, size_t size); @@ -81,12 +81,6 @@ The function talloc_size() should be used when you don't have a convenient type to pass to talloc(). Unlike talloc(), it is not type safe (as it returns a void *), so you are on your own for type checking. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -void *talloc_p(const void *context, type); - -talloc_p() is a alias for talloc(). It only exists as a backwards -compatibity macro for code from the bad old days when talloc() was not -type safe. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- int talloc_free(void *ptr); @@ -491,10 +485,13 @@ The talloc_array() macro is equivalent to: except that it provides integer overflow protection for the multiply, returning NULL if the multiply overflows. + =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- void *talloc_array_size(const void *ctx, size_t size, uint_t count); -The talloc_array_size() function is useful when the type is not known +The talloc_array_size() function is useful when the type is not +known. It operates in the same way as talloc_array(), but takes a size +instead of a type. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- @@ -506,6 +503,7 @@ implementation encapsulates the functionality of malloc(), free() and realloc() in one call, which is why it is useful to be able to pass around a single function pointer. + =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- void *talloc_autofree_context(void); @@ -540,7 +538,3 @@ talloc_get_type() to do type checking on void* pointers. It is equivalent to this: talloc_set_name_const(ptr, #type) - - - - |