| 384 */ |
384 */ |
| 385 #define cxReallocateArray(allocator, mem, nmemb, size) \ |
385 #define cxReallocateArray(allocator, mem, nmemb, size) \ |
| 386 cxReallocateArray_(allocator, (void**) (mem), nmemb, size) |
386 cxReallocateArray_(allocator, (void**) (mem), nmemb, size) |
| 387 |
387 |
| 388 /** |
388 /** |
| 389 * Allocate @p nelem elements of @p n bytes each, all initialized to zero. |
389 * Allocate @p nmemb elements of @p n bytes each, all initialized to zero. |
| 390 * |
390 * |
| 391 * @param allocator the allocator |
391 * @param allocator the allocator |
| 392 * @param nelem the number of elements |
392 * @param nmemb the number of elements |
| 393 * @param n the size of each element in bytes |
393 * @param size the size of each element in bytes |
| 394 * @return a pointer to the allocated memory |
394 * @return a pointer to the allocated memory |
| 395 */ |
395 */ |
| 396 cx_attr_nonnull_arg(1) |
396 cx_attr_nonnull_arg(1) |
| 397 cx_attr_nodiscard |
397 cx_attr_nodiscard |
| 398 cx_attr_malloc |
398 cx_attr_malloc |
| 399 cx_attr_dealloc_ucx |
399 cx_attr_dealloc_ucx |
| 400 cx_attr_allocsize(2, 3) |
400 cx_attr_allocsize(2, 3) |
| 401 void *cxCalloc( |
401 void *cxCalloc( |
| 402 const CxAllocator *allocator, |
402 const CxAllocator *allocator, |
| 403 size_t nelem, |
403 size_t nmemb, |
| 404 size_t n |
404 size_t size |
| 405 ); |
405 ); |
| 406 |
406 |
| 407 #ifdef __cplusplus |
407 #ifdef __cplusplus |
| 408 } // extern "C" |
408 } // extern "C" |
| 409 #endif |
409 #endif |