diff options
Diffstat (limited to 'src/daemon/memorypool.c')
-rw-r--r-- | src/daemon/memorypool.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/daemon/memorypool.c b/src/daemon/memorypool.c index 32f5217f..bd7c0c3a 100644 --- a/src/daemon/memorypool.c +++ b/src/daemon/memorypool.c | |||
@@ -81,6 +81,7 @@ struct MemoryPool | |||
81 | * Create a memory pool. | 81 | * Create a memory pool. |
82 | * | 82 | * |
83 | * @param max maximum size of the pool | 83 | * @param max maximum size of the pool |
84 | * @return NULL on error | ||
84 | */ | 85 | */ |
85 | struct MemoryPool * | 86 | struct MemoryPool * |
86 | MHD_pool_create (size_t max) | 87 | MHD_pool_create (size_t max) |
@@ -119,6 +120,8 @@ MHD_pool_create (size_t max) | |||
119 | 120 | ||
120 | /** | 121 | /** |
121 | * Destroy a memory pool. | 122 | * Destroy a memory pool. |
123 | * | ||
124 | * @param pool memory pool to destroy | ||
122 | */ | 125 | */ |
123 | void | 126 | void |
124 | MHD_pool_destroy (struct MemoryPool *pool) | 127 | MHD_pool_destroy (struct MemoryPool *pool) |
@@ -135,6 +138,12 @@ MHD_pool_destroy (struct MemoryPool *pool) | |||
135 | 138 | ||
136 | /** | 139 | /** |
137 | * Allocate size bytes from the pool. | 140 | * Allocate size bytes from the pool. |
141 | * | ||
142 | * @param pool memory pool to use for the operation | ||
143 | * @param size number of bytes to allocate | ||
144 | * @param from_end allocate from end of pool (set to MHD_YES); | ||
145 | * use this for small, persistent allocations that | ||
146 | * will never be reallocated | ||
138 | * @return NULL if the pool cannot support size more | 147 | * @return NULL if the pool cannot support size more |
139 | * bytes | 148 | * bytes |
140 | */ | 149 | */ |
@@ -170,6 +179,7 @@ MHD_pool_allocate (struct MemoryPool *pool, | |||
170 | * allocation may be leaked until the pool is | 179 | * allocation may be leaked until the pool is |
171 | * destroyed (and copying the data maybe required). | 180 | * destroyed (and copying the data maybe required). |
172 | * | 181 | * |
182 | * @param pool memory pool to use for the operation | ||
173 | * @param old the existing block | 183 | * @param old the existing block |
174 | * @param old_size the size of the existing block | 184 | * @param old_size the size of the existing block |
175 | * @param new_size the new size of the block | 185 | * @param new_size the new size of the block |
@@ -223,6 +233,7 @@ MHD_pool_reallocate (struct MemoryPool *pool, | |||
223 | * Clear all entries from the memory pool except | 233 | * Clear all entries from the memory pool except |
224 | * for "keep" of the given "size". | 234 | * for "keep" of the given "size". |
225 | * | 235 | * |
236 | * @param pool memory pool to use for the operation | ||
226 | * @param keep pointer to the entry to keep (maybe NULL) | 237 | * @param keep pointer to the entry to keep (maybe NULL) |
227 | * @param size how many bytes need to be kept at this address | 238 | * @param size how many bytes need to be kept at this address |
228 | * @return addr new address of "keep" (if it had to change) | 239 | * @return addr new address of "keep" (if it had to change) |