5 ms·
I think /dev/shm is available on most(?) Linux systems by default these days. I tend to use it instead of /tmp when I can.
by mr_toad 6y ago
I think /dev/shm is available on most(?) Linux systems by default these days. I tend to use it instead of /tmp when I can.
- yjftsjthsd-h 6y agoOn some distros, /tmp is a tmpfs (ramdisk) anyways. Which of course I discovered when building a package that was bigger than my installed memory (really big package on Arch Linux, which both mounts tmpfs there and then uses it as the default makepkg location).
- rcoveson 6y agoI really hate this hack. It feels like an attempt by distro maintainers to make their distro feel and/or benchmark quicker than others. I don't know if that's the original reason it was done, but I do know that it's a big pain to work around for a program author. If I'm writing to /tmp, I expect that the file might be swapped to disk, and indeed that it will be paged to disk before the OOM killer comes for me. If what I wanted was named shared memory, I'd put it in /dev/shm.
- fomine3 6y agoWhat about /var/tmp ?