htrdr

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

commit 940d26112b6278513d16b78f17b4fb246f38d171
parent 07c2335981bd8dc9f57b41053ae2a980b5f829c4
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Sun, 30 Mar 2025 17:25:55 +0200

core: updated size of dynamic allocations per thread

Increase of 4 MB to manage the Star-SamPling update, which now stores
its RNG cache in memory, rather than in temporary files. The memory to
be allocated per thread has therefore been increased accordingly.

Diffstat:
Msrc/core/htrdr.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/core/htrdr.c b/src/core/htrdr.c @@ -369,8 +369,12 @@ htrdr_create } FOR_EACH(ithread, 0, htrdr->nthreads) { + const size_t per_thread_size = + 4*1024*1024 /* 4 MB for the RNG cache */ + + 16*1024; /* 16 KB for remaining allocations */ + res = mem_init_lifo_allocator - (&htrdr->lifo_allocators[ithread], htrdr->allocator, 16384); + (&htrdr->lifo_allocators[ithread], htrdr->allocator, per_thread_size); if(res != RES_OK) { htrdr_log_err(htrdr, "%s: could not initialise the LIFO allocator of the thread %lu -- %s.\n",