51 /** |
51 /** |
52 * Re-allocates space for the given array. |
52 * Re-allocates space for the given array. |
53 * |
53 * |
54 * Implementations are not required to free the original array. |
54 * Implementations are not required to free the original array. |
55 * This allows re-allocation of static memory by allocating heap memory |
55 * This allows re-allocation of static memory by allocating heap memory |
56 * and copying the array contents. The information in \p data can keep |
56 * and copying the array contents. The information in the custom fields of |
57 * track of the state of the memory or other additional allocator info. |
57 * the referenced allocator can be used to track the state of the memory |
|
58 * or to transport other additional data. |
58 * |
59 * |
59 * @param array the array to reallocate |
60 * @param array the array to reallocate |
60 * @param capacity the new capacity (number of elements) |
61 * @param capacity the new capacity (number of elements) |
61 * @param elem_size the size of each element |
62 * @param elem_size the size of each element |
62 * @param alloc a reference to this allocator |
63 * @param alloc a reference to this allocator |