summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-12-19 07:36:32 +0000
committerMartin Pool <mbp@samba.org>2001-12-19 07:36:32 +0000
commit7110a867a1eb8284f84d55c7507531a10733f5c7 (patch)
tree7e87e8ab0fb667dfb380988afa4f42ffa764643f /source3/include
parentfc00418dfc8863a17a98cb621ab98fa522dff01b (diff)
downloadsamba-7110a867a1eb8284f84d55c7507531a10733f5c7.tar.gz
samba-7110a867a1eb8284f84d55c7507531a10733f5c7.tar.bz2
samba-7110a867a1eb8284f84d55c7507531a10733f5c7.zip
Make TALLOC_CTX and talloc_chunk private to talloc.c.
Add a global singly-linked list of all active talloc pools, so that we can eventually show how much memory is used for different purposes. This also gives a check that pools are not being doubly freed. talloc_init_named now handle a NULL name properly (ie does nothing) Add accessor talloc_pool_name(). (This used to be commit 4c6c03c8c7c18762dd9ef1a1bd88350b8960542f)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/talloc.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/source3/include/talloc.h b/source3/include/talloc.h
index 198a27b49b..d8a98f07e6 100644
--- a/source3/include/talloc.h
+++ b/source3/include/talloc.h
@@ -28,25 +28,10 @@
* @sa talloc.c
*/
-struct talloc_chunk {
- struct talloc_chunk *next;
- size_t size;
- void *ptr;
-};
-
-
/**
* talloc allocation pool. All allocated blocks can be freed in one go.
**/
-typedef struct {
- 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;
-} TALLOC_CTX;
+typedef struct talloc_ctx TALLOC_CTX;
TALLOC_CTX *talloc_init_named(char const *fmt, ...) PRINTF_ATTRIBUTE(1, 2);