1 /* 2 Copyright (c) 2004-2012 NFG Net Facilities Group BV support@nfg.nl 3 4 This program is free software; you can redistribute it and/or 5 modify it under the terms of the GNU General Public License 6 as published by the Free Software Foundation; either 7 version 2 of the License, or (at your option) any later 8 version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 19 */ 20 #ifndef DM_MEMPOOL_H 21 #define DM_MEMPOOL_H 22 /* 23 * provide simple memory pool 24 */ 25 #define M Mempool_T 26 27 typedef struct M *M; 28 29 extern M mempool_open(void); 30 extern void * mempool_pop(M, size_t); 31 extern void * mempool_resize(M, void *, size_t, size_t); 32 extern void mempool_push(M, void *, size_t); 33 extern void mempool_close(M *); 34 35 #undef M 36 37 #endif 38