While playing Dwarf of Fortress (the Steam version launched from a terminal outside of Steam) the (non-cache) kernel dynamic memory usage (as reported by smem -wk) increases continuously at a rate of about 50MB every 10 seconds, leading to eventual swapping and out-of-memory problems. Further, this memory is not freed, even if the application is terminated.
My understanding is that, even with potential memory management issues inside the application, this should not be happening. I also realize that this isn't much to go on. Hence, I would be happy for guidance to provide more specific information.
memory usage after system boot:
Code: Select all
$ smem -wk
Area Used Cache Noncache
firmware/hardware 0 0 0
kernel image 0 0 0
kernel dynamic memory 4.4G 3.4G 1003.2M
userspace memory 5.5G 643.3M 4.9G
free memory 52.0G 52.0G 0
Code: Select all
$ ps -C dwarfort -o drs,rss,vsz
DRS RSS VSZ
23845851 2530968 23874672
Code: Select all
$ ps -C dwarfort -o drs,rss,vsz
DRS RSS VSZ
$ smem -wk
Area Used Cache Noncache
firmware/hardware 0 0 0
kernel image 0 0 0
kernel dynamic memory 22.9G 3.8G 19.1G
userspace memory 3.9G 599.0M 3.3G
free memory 35.1G 35.1G 0
Code: Select all
Portage 3.0.72 (python 3.13.5-final-0, default/linux/amd64/23.0/desktop/systemd, gcc-15, glibc-2.41-r6, 6.17.11-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.17.11-gentoo-dist-x86_64-AMD_Ryzen_9_7900X3D_12-Core_Processor-with-glibc2.41
KiB Mem: 64952880 total, 18472820 free
KiB Swap: 32767996 total, 32767996 free


