diff --git a/org/qmckl_memory.org b/org/qmckl_memory.org index f2887c6..a83ab73 100644 --- a/org/qmckl_memory.org +++ b/org/qmckl_memory.org @@ -125,8 +125,8 @@ void* qmckl_malloc(qmckl_context context, const qmckl_memory_info_struct info) { /* If qmckl_memory_struct is full, reallocate a larger one */ if (ctx->memory.n_allocated == ctx->memory.array_size) { const size_t old_size = ctx->memory.array_size; - qmckl_memory_info_struct * new_array = reallocarray(ctx->memory.element, - 2L * old_size, + qmckl_memory_info_struct * new_array = realloc(ctx->memory.element, + 2L * old_size * sizeof(qmckl_memory_info_struct)); if (new_array == NULL) { qmckl_unlock(context);