htrdr

Solving radiative transfer in heterogeneous media
git clone git://git.meso-star.fr/htrdr.git
Log | Files | Refs | README | LICENSE

commit a17ee02467b1ed1b00369238bb687ef067bee1cb
parent 397e71e17a84d8dbaaef30689bec3294a16b75e9
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 24 Oct 2022 09:29:16 +0200

Upd how memory leaks are handled in atmopshere/combustion

Diffstat:
Msrc/atmosphere/htrdr_atmosphere_main.c | 4++--
Msrc/combustion/htrdr_combustion_main.c | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/atmosphere/htrdr_atmosphere_main.c b/src/atmosphere/htrdr_atmosphere_main.c @@ -31,7 +31,7 @@ htrdr_atmosphere_main(int argc, char** argv) struct htrdr_atmosphere_args cmd_args = HTRDR_ATMOSPHERE_ARGS_DEFAULT; struct htrdr* htrdr = NULL; struct htrdr_atmosphere* cmd = NULL; - const size_t memsz_begin = MEM_ALLOCATED_SIZE(&mem_default_allocator); + const size_t memsz_begin = mem_allocated_size(); size_t memsz_end; int is_mpi_init = 0; int err = 0; @@ -71,7 +71,7 @@ exit: if(cmd) htrdr_atmosphere_ref_put(cmd); /* Check memory leaks */ - memsz_end = MEM_ALLOCATED_SIZE(&mem_default_allocator); + memsz_end = mem_allocated_size(); if(memsz_begin != memsz_end) { ASSERT(memsz_end >= memsz_begin); fprintf(stderr, HTRDR_LOG_WARNING_PREFIX"Memory leaks: %lu Bytes\n", diff --git a/src/combustion/htrdr_combustion_main.c b/src/combustion/htrdr_combustion_main.c @@ -32,7 +32,7 @@ htrdr_combustion_main(int argc, char** argv) struct htrdr_combustion_args cmd_args = HTRDR_COMBUSTION_ARGS_DEFAULT; struct htrdr* htrdr = NULL; struct htrdr_combustion* cmd = NULL; - const size_t memsz_begin = MEM_ALLOCATED_SIZE(&mem_default_allocator); + const size_t memsz_begin = mem_allocated_size(); size_t memsz_end; int is_mpi_init = 0; res_T res = RES_OK; @@ -72,7 +72,7 @@ exit: if(cmd) htrdr_combustion_ref_put(cmd); /* Check memory leaks */ - memsz_end = MEM_ALLOCATED_SIZE(&mem_default_allocator); + memsz_end = mem_allocated_size(); if(memsz_begin != memsz_end) { ASSERT(memsz_end >= memsz_begin); fprintf(stderr, HTRDR_LOG_WARNING_PREFIX"Memory leaks: %lu Bytes\n",