TDB password backend support written by Simo Sorce <simo.sorce@polimi.it>
[Samba.git] / source / include / talloc.h
blob85a722d0807f28aa7e8b783689ceb303ef191b8b
1 #ifndef _TALLOC_H_
2 #define _TALLOC_H_
3 /*
4 Unix SMB/Netbios implementation.
5 Version 3.0
6 Samba temporary memory allocation functions
7 Copyright (C) Andrew Tridgell 2000
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifdef DEBUG_TALLOC
25 #define BAD_PTR (void*)0xdeadbeef
26 #else
27 #define BAD_PTR NULL
28 #endif
30 struct talloc_chunk {
31 struct talloc_chunk *next;
32 void *ptr;
33 size_t alloc_size;
34 size_t total_size;
37 typedef struct {
38 struct talloc_chunk *list;
39 } TALLOC_CTX;
41 #endif