2 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
4 * Authors: Michael Zucchi <notzed@ximian.com>
5 * Jacob Berkman <jacob@ximian.com>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of version 2 of the GNU Lesser General Public
9 * License as published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
22 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
23 #error "Only <camel/camel.h> can be included directly."
26 #ifndef CAMEL_MEMCHUNK_H
27 #define CAMEL_MEMCHUNK_H
33 /* memchunks - allocate/free fixed-size blocks of memory */
34 /* this is like gmemchunk, only faster and less overhead (only 4 bytes for every atomcount allocations) */
35 typedef struct _CamelMemChunk CamelMemChunk;
37 CamelMemChunk * camel_memchunk_new (gint atomcount,
39 gpointer camel_memchunk_alloc (CamelMemChunk *memchunk);
40 gpointer camel_memchunk_alloc0 (CamelMemChunk *memchunk);
41 void camel_memchunk_free (CamelMemChunk *memchunk,
43 void camel_memchunk_empty (CamelMemChunk *memchunk);
44 void camel_memchunk_clean (CamelMemChunk *memchunk);
45 void camel_memchunk_destroy (CamelMemChunk *memchunk);
49 #endif /* CAMEL_MEMCHUNK_H */