diff options
Diffstat (limited to 'src/daemon/memorypool.h')
-rw-r--r-- | src/daemon/memorypool.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/daemon/memorypool.h b/src/daemon/memorypool.h index 537fb61e..51f81674 100644 --- a/src/daemon/memorypool.h +++ b/src/daemon/memorypool.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libmicrohttpd | 2 | This file is part of libmicrohttpd |
3 | (C) 2007 Daniel Pittman and Christian Grothoff | 3 | (C) 2007, 2009 Daniel Pittman and Christian Grothoff |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
@@ -42,7 +42,7 @@ struct MemoryPool; | |||
42 | * | 42 | * |
43 | * @param max maximum size of the pool | 43 | * @param max maximum size of the pool |
44 | */ | 44 | */ |
45 | struct MemoryPool *MHD_pool_create (unsigned int max); | 45 | struct MemoryPool *MHD_pool_create (size_t max); |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Destroy a memory pool. | 48 | * Destroy a memory pool. |
@@ -59,7 +59,7 @@ void MHD_pool_destroy (struct MemoryPool *pool); | |||
59 | * bytes | 59 | * bytes |
60 | */ | 60 | */ |
61 | void *MHD_pool_allocate (struct MemoryPool *pool, | 61 | void *MHD_pool_allocate (struct MemoryPool *pool, |
62 | unsigned int size, int from_end); | 62 | size_t size, int from_end); |
63 | 63 | ||
64 | /** | 64 | /** |
65 | * Reallocate a block of memory obtained from the pool. | 65 | * Reallocate a block of memory obtained from the pool. |
@@ -79,7 +79,8 @@ void *MHD_pool_allocate (struct MemoryPool *pool, | |||
79 | */ | 79 | */ |
80 | void *MHD_pool_reallocate (struct MemoryPool *pool, | 80 | void *MHD_pool_reallocate (struct MemoryPool *pool, |
81 | void *old, | 81 | void *old, |
82 | unsigned int old_size, unsigned int new_size); | 82 | size_t old_size, |
83 | size_t new_size); | ||
83 | 84 | ||
84 | /** | 85 | /** |
85 | * Clear all entries from the memory pool except | 86 | * Clear all entries from the memory pool except |
@@ -89,6 +90,8 @@ void *MHD_pool_reallocate (struct MemoryPool *pool, | |||
89 | * @param size how many bytes need to be kept at this address | 90 | * @param size how many bytes need to be kept at this address |
90 | * @return addr new address of "keep" (if it had to change) | 91 | * @return addr new address of "keep" (if it had to change) |
91 | */ | 92 | */ |
92 | void *MHD_pool_reset (struct MemoryPool *pool, void *keep, unsigned int size); | 93 | void *MHD_pool_reset (struct MemoryPool *pool, |
94 | void *keep, | ||
95 | size_t size); | ||
93 | 96 | ||
94 | #endif | 97 | #endif |