diff options
Diffstat (limited to 'src/microhttpd/memorypool.h')
-rw-r--r-- | src/microhttpd/memorypool.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/microhttpd/memorypool.h b/src/microhttpd/memorypool.h index 49bbcbe1..18c8e63c 100644 --- a/src/microhttpd/memorypool.h +++ b/src/microhttpd/memorypool.h | |||
@@ -87,6 +87,20 @@ MHD_pool_allocate (struct MemoryPool *pool, | |||
87 | size_t size, | 87 | size_t size, |
88 | bool from_end); | 88 | bool from_end); |
89 | 89 | ||
90 | /** | ||
91 | * Checks whether allocated block is re-sizable in-place. | ||
92 | * If block is not re-sizable in-place, it still could be shrunk, but freed | ||
93 | * memory will not be re-used until reset of the pool. | ||
94 | * @param pool the memory pool to use | ||
95 | * @param block the pointer to the allocated block to check | ||
96 | * @param block_size the size of the allocated @a block | ||
97 | * @return true if block can be resized in-place in the optimal way, | ||
98 | * false otherwise | ||
99 | */ | ||
100 | bool | ||
101 | MHD_pool_is_resizable_inplace (struct MemoryPool *pool, | ||
102 | void *block, | ||
103 | size_t block_size); | ||
90 | 104 | ||
91 | /** | 105 | /** |
92 | * Try to allocate @a size bytes memory area from the @a pool. | 106 | * Try to allocate @a size bytes memory area from the @a pool. |