GNU libmicrohttpd 0.9.77
Loading...
Searching...
No Matches
memorypool.h
Go to the documentation of this file.
1/*
2 This file is part of libmicrohttpd
3 Copyright (C) 2007, 2009 Daniel Pittman and Christian Grothoff
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library 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 GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18*/
19
28#ifndef MEMORYPOOL_H
29#define MEMORYPOOL_H
30
31#include "internal.h"
32
38struct MemoryPool;
39
40
47struct MemoryPool *
48MHD_pool_create (size_t max);
49
50
56void
57MHD_pool_destroy (struct MemoryPool *pool);
58
59
71void *
72MHD_pool_allocate (struct MemoryPool *pool,
73 size_t size,
74 int from_end);
75
76
94void *
95MHD_pool_reallocate (struct MemoryPool *pool,
96 void *old,
97 size_t old_size,
98 size_t new_size);
99
100
107size_t
108MHD_pool_get_free (struct MemoryPool *pool);
109
110
124void *
125MHD_pool_reset (struct MemoryPool *pool,
126 void *keep,
127 size_t copy_bytes,
128 size_t new_size);
129
130#endif
void * MHD_pool_reallocate(struct MemoryPool *pool, void *old, size_t old_size, size_t new_size)
Definition memorypool.c:248
void MHD_pool_destroy(struct MemoryPool *pool)
Definition memorypool.c:157
size_t MHD_pool_get_free(struct MemoryPool *pool)
Definition memorypool.c:185
void * MHD_pool_reset(struct MemoryPool *pool, void *keep, size_t copy_bytes, size_t new_size)
Definition memorypool.c:314
struct MemoryPool * MHD_pool_create(size_t max)
Definition memorypool.c:102
void * MHD_pool_allocate(struct MemoryPool *pool, size_t size, int from_end)
Definition memorypool.c:203
MHD internal shared structures.