Hi @misc, does OpenBSD provide something equivalent to Linux' malloc_trim(3)[1]? I am yet to port an application from Linux to OpenBSD and that application is making use of malloc_trim(3). I removed the calls to malloc_trim(3) from that application while still running on Linux and it seems it really needs to perform those calls there in order to release memory to the OS after having run for a couple of weeks without restart. That application is using pthreads(7)[2] a lot but this is not the issue. Even if it would fork/execve, those processes also would not get terminated up until the whole application is terminated.
[1] <https://man7.org/linux/man-pages/man3/malloc_trim.3.html> [2] <https://man7.org/linux/man-pages/man7/pthreads.7.html> -- Christian