Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sometimes I use /dev/shm for temporary files, as big as 500MB, (I have 8 GB RAM - Ubuntu 11.04 x86-64) and when I load StarCraft II (with wine) I might get memory errors in the game (corrupted data or "Couldn't load xyz").

If instead I use proper temporary filesystem for my files (like and SSD disk mounted on /disk3) I don't experience any sort of issue.

Could this be due to the fact that /dev/shm gets continuously filled and emptied whilst SC2 (or other programs here) expect to have some available memory and hence malloc fails (and the process then reports errors where it before expected to have some available memory)?

I'm really puzzled by this.

share|improve this question
add comment

1 Answer 1

As far as I have heard, the GNU libc has its own semantics on /dev/shm/ and as a user (or local admin) you are supposed to not use it yourself at all.

Also, it’s size-limited in most distributions.

And yes, something like Wine will use lots of shared memory, that also eats up /dev/shm.

I suggest to mount a tmpfs onto someplace else (in fact, I recommend running systems with /tmp as tmpfs and using TMPDIR=/var/tmp for things that need a larger scratch space).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.