00001 /* 00002 This file is part of libmicrohttpd 00003 (C) 2007, 2009 Daniel Pittman and Christian Grothoff 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 */ 00019 00028 #ifndef MEMORYPOOL_H 00029 #define MEMORYPOOL_H 00030 00031 #include "internal.h" 00032 00038 struct MemoryPool; 00039 00040 00047 struct MemoryPool * 00048 MHD_pool_create (size_t max); 00049 00050 00056 void 00057 MHD_pool_destroy (struct MemoryPool *pool); 00058 00059 00071 void * 00072 MHD_pool_allocate (struct MemoryPool *pool, 00073 size_t size, int from_end); 00074 00075 00093 void * 00094 MHD_pool_reallocate (struct MemoryPool *pool, 00095 void *old, 00096 size_t old_size, 00097 size_t new_size); 00098 00099 00109 void * 00110 MHD_pool_reset (struct MemoryPool *pool, 00111 void *keep, 00112 size_t size); 00113 00114 #endif