mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-22 12:23:56 +01:00
removed malloc.h
This commit is contained in:
parent
e65fa310d3
commit
b7a0f608c8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user