Skip to content
Snippets Groups Projects
Commit 4e94a425 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Remove old memuse counter

parent f4e3067e
Branches
Tags
1 merge request!757Memory allocations logger
...@@ -814,13 +814,11 @@ void runner_do_hydro_sort(struct runner *r, struct cell *c, int flags, ...@@ -814,13 +814,11 @@ void runner_do_hydro_sort(struct runner *r, struct cell *c, int flags,
#endif #endif
/* start by allocating the entry arrays in the requested dimensions. */ /* start by allocating the entry arrays in the requested dimensions. */
size_t allocated = 0;
for (int j = 0; j < 13; j++) { for (int j = 0; j < 13; j++) {
if ((flags & (1 << j)) && c->hydro.sort[j] == NULL) { if ((flags & (1 << j)) && c->hydro.sort[j] == NULL) {
if ((c->hydro.sort[j] = (struct entry *)malloc(sizeof(struct entry) * if ((c->hydro.sort[j] = (struct entry *)malloc(sizeof(struct entry) *
(count + 1))) == NULL) (count + 1))) == NULL)
error("Failed to allocate sort memory."); error("Failed to allocate sort memory.");
allocated += sizeof(struct entry) * (count + 1);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment