diff --git a/src/parallel_io.c b/src/parallel_io.c index e6547245877b7e2c7cfc8a6a455f0714cb173479..0160a53c110c8913e42e0d7cd7c8720a9ed3d331 100644 --- a/src/parallel_io.c +++ b/src/parallel_io.c @@ -473,7 +473,7 @@ void writeArray_chunk(struct engine* e, hid_t h_data, /* Allocate temporary buffer */ void* temp = NULL; - if (swift_memalign("writetemp", (void**)&temp, IO_BUFFER_ALIGNMENT, + if (swift_memalign("writebuff", (void**)&temp, IO_BUFFER_ALIGNMENT, num_elements * typeSize) != 0) error("Unable to allocate temporary i/o buffer"); @@ -557,7 +557,7 @@ void writeArray_chunk(struct engine* e, hid_t h_data, #endif /* Free and close everything */ - swift_free("writetemp", temp); + swift_free("writebuff", temp); H5Sclose(h_memspace); H5Sclose(h_filespace); } diff --git a/src/serial_io.c b/src/serial_io.c index dc30f3007cb8597f6c5063e5c10b2c8053c24938..55a468411b7b9f84d4e05b8f388a5de7873f7f59 100644 --- a/src/serial_io.c +++ b/src/serial_io.c @@ -365,7 +365,7 @@ void writeArray(const struct engine* e, hid_t grp, char* fileName, /* Allocate temporary buffer */ void* temp = NULL; - if (swift_memalign("writetemp", (void**)&temp, IO_BUFFER_ALIGNMENT, + if (swift_memalign("writebuff", (void**)&temp, IO_BUFFER_ALIGNMENT, num_elements * typeSize) != 0) error("Unable to allocate temporary i/o buffer"); @@ -416,7 +416,7 @@ void writeArray(const struct engine* e, hid_t grp, char* fileName, if (h_err < 0) error("Error while writing data array '%s'.", props.name); /* Free and close everything */ - swift_free("writetemp", temp); + swift_free("writebuff", temp); H5Dclose(h_data); H5Sclose(h_memspace); H5Sclose(h_filespace); diff --git a/src/single_io.c b/src/single_io.c index b770ef95a0246710dcdd2005f8f057eec43f8e1d..917dd880495300cea8f5d16df85513c6386b53f2 100644 --- a/src/single_io.c +++ b/src/single_io.c @@ -241,7 +241,7 @@ void writeArray(const struct engine* e, hid_t grp, char* fileName, /* Allocate temporary buffer */ void* temp = NULL; - if (swift_memalign("writetemp", (void**)&temp, IO_BUFFER_ALIGNMENT, + if (swift_memalign("writebuff", (void**)&temp, IO_BUFFER_ALIGNMENT, num_elements * typeSize) != 0) error("Unable to allocate temporary i/o buffer"); @@ -333,7 +333,7 @@ void writeArray(const struct engine* e, hid_t grp, char* fileName, io_write_attribute_s(h_data, "Conversion factor", buffer); /* Free and close everything */ - swift_free("writetemp", temp); + swift_free("writebuff", temp); H5Pclose(h_prop); H5Dclose(h_data); H5Sclose(h_space); diff --git a/src/space.c b/src/space.c index 9f53b683975d84b4c10d7c2297f63a6ac2c164da..ac6ee227dfd36a5e5e2aa5a12f9da14978b3a8ee 100644 --- a/src/space.c +++ b/src/space.c @@ -313,17 +313,17 @@ void space_free_foreign_parts(struct space *s) { #ifdef WITH_MPI if (s->parts_foreign != NULL) { - free(s->parts_foreign); + swift_free("parts_foreign", s->parts_foreign); s->size_parts_foreign = 0; s->parts_foreign = NULL; } if (s->gparts_foreign != NULL) { - free(s->gparts_foreign); + swift_free("gparts_foreign", s->gparts_foreign); s->size_gparts_foreign = 0; s->gparts_foreign = NULL; } if (s->sparts_foreign != NULL) { - free(s->sparts_foreign); + swift_free("sparts_foreign", s->sparts_foreign); s->size_sparts_foreign = 0; s->sparts_foreign = NULL; } @@ -2277,7 +2277,7 @@ void space_parts_sort(struct part *parts, struct xpart *xparts, ptrdiff_t parts_offset) { /* Create the offsets array. */ size_t *offsets = NULL; - if (swift_memalign("offsets", (void **)&offsets, SWIFT_STRUCT_ALIGNMENT, + if (swift_memalign("parts_offsets", (void **)&offsets, SWIFT_STRUCT_ALIGNMENT, sizeof(size_t) * (num_bins + 1)) != 0) error("Failed to allocate temporary cell offsets array."); @@ -2322,7 +2322,7 @@ void space_parts_sort(struct part *parts, struct xpart *xparts, error("Bad offsets after shuffle."); #endif /* SWIFT_DEBUG_CHECKS */ - swift_free("offsets", offsets); + swift_free("parts_offsets", offsets); } /** @@ -2340,7 +2340,7 @@ void space_sparts_sort(struct spart *sparts, int *restrict ind, ptrdiff_t sparts_offset) { /* Create the offsets array. */ size_t *offsets = NULL; - if (swift_memalign("offsets", (void **)&offsets, SWIFT_STRUCT_ALIGNMENT, + if (swift_memalign("sparts_offsets", (void **)&offsets, SWIFT_STRUCT_ALIGNMENT, sizeof(size_t) * (num_bins + 1)) != 0) error("Failed to allocate temporary cell offsets array."); @@ -2382,7 +2382,7 @@ void space_sparts_sort(struct spart *sparts, int *restrict ind, error("Bad offsets after shuffle."); #endif /* SWIFT_DEBUG_CHECKS */ - swift_free("offsets", offsets); + swift_free("sparts_offsets", offsets); } /** @@ -2400,7 +2400,7 @@ void space_gparts_sort(struct gpart *gparts, struct part *parts, int *restrict counts, int num_bins) { /* Create the offsets array. */ size_t *offsets = NULL; - if (swift_memalign("offsets", (void **)&offsets, SWIFT_STRUCT_ALIGNMENT, + if (swift_memalign("gparts_offsets", (void **)&offsets, SWIFT_STRUCT_ALIGNMENT, sizeof(size_t) * (num_bins + 1)) != 0) error("Failed to allocate temporary cell offsets array."); @@ -2448,7 +2448,7 @@ void space_gparts_sort(struct gpart *gparts, struct part *parts, error("Bad offsets after shuffle."); #endif /* SWIFT_DEBUG_CHECKS */ - swift_free("offsets", offsets); + swift_free("gparts_offsets", offsets); } /**