summaryrefslogtreecommitdiff
path: root/source3/include/talloc.h
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2003-10-06 01:38:46 +0000
committerSimo Sorce <idra@samba.org>2003-10-06 01:38:46 +0000
commitb1f610ebb1ba1e6ae0f0e9fbbc703f6a4af68b67 (patch)
tree3a116be18471c30bdf79e89876cfb0529fd35162 /source3/include/talloc.h
parent487130a6df828c21916ccddc6d3aa66169cd8bb2 (diff)
downloadsamba-b1f610ebb1ba1e6ae0f0e9fbbc703f6a4af68b67.tar.gz
samba-b1f610ebb1ba1e6ae0f0e9fbbc703f6a4af68b67.tar.bz2
samba-b1f610ebb1ba1e6ae0f0e9fbbc703f6a4af68b67.zip
split some security related functions in their own files.
(no need to include all of smbd files to use some basic sec functions) also minor compile fixes couldn't compile to test these due to some kerberos problems wirh 3.0, but on HEAD they're working well, so I suppose it's ok to commit (This used to be commit c78f2d0bd15ecd2ba643bb141cc35a3405787aa1)
Diffstat (limited to 'source3/include/talloc.h')
-rw-r--r--source3/include/talloc.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/include/talloc.h b/source3/include/talloc.h
index 4badddbb88..433b52ec95 100644
--- a/source3/include/talloc.h
+++ b/source3/include/talloc.h
@@ -30,6 +30,27 @@
/**
* talloc allocation pool. All allocated blocks can be freed in one go.
**/
+
+struct talloc_chunk {
+ struct talloc_chunk *next;
+ size_t size;
+ void *ptr;
+};
+
+struct talloc_ctx {
+ struct talloc_chunk *list;
+ size_t total_alloc_size;
+
+ /** The name recorded for this pool, if any. Should describe
+ * the purpose for which it was allocated. The string is
+ * allocated within the pool. **/
+ char *name;
+
+ /** Pointer to the next allocate talloc pool, so that we can
+ * summarize all talloc memory usage. **/
+ struct talloc_ctx *next_ctx;
+};
+
typedef struct talloc_ctx TALLOC_CTX;
TALLOC_CTX *talloc_init(char const *fmt, ...) PRINTF_ATTRIBUTE(1, 2);