tmpfs goes in RAM
Your /tmp may already be tmpfs ?
from /etc/fstab
tmpfs /tmp tmpfs nodev,nosuid,size=16G
A similar line
tmpfs /var/log tmpfs nodev,nosuid,size=16G
Will mount /var/log as a tmpfs. IE in memory
This is the line that mounts my ~/.cache
tmpfs /home/gripped/.cache tmpfs noatime,nodev,nosuid,size=28G
Big size because yay uses it and firedragon needs a lot of space to compile.
Only as much memory as is needed will be used. If it reserves any it isn't much. So with 32GB I can have multiple 16GB tmpfs and that's not an issue unless they all want to use it all at once. In which case you'd get 'out of space' errors