summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--talloc_guide.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/talloc_guide.txt b/talloc_guide.txt
index 925f485997..ed3f7713aa 100644
--- a/talloc_guide.txt
+++ b/talloc_guide.txt
@@ -65,6 +65,19 @@ level context is created.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+void *talloc_p(const void *context, type);
+
+The talloc_p() macro is the equivalent of
+
+ (type *)talloc(ctx, sizeof(type))
+
+You should use it in preference to talloc() whenever possible, as it
+provides additional type safety. It also automatically calls the
+talloc_set_name_const() function with the name being a string holding
+the name of the type.
+
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
int talloc_free(void *ptr);
The talloc_free() function frees a piece of talloc memory, and all its