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.

I have 8GB of RAM and 4GB is dedicated to the tmpfs on /dev/shm.

There's nothing actually in /dev/shm, so I'm wondering, is this memory still available for applications to use?

If I needed to use 7GB in an application (which I do) would the tmpfs give up part of its allocated memory for this, or would I end up using swap after 4GB?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

From Documentation/filesystems/tmpfs.txt:

tmpfs ... grows and shrinks to accommodate the files it contains and is able to swap unneeded pages out to swap space.

So unless you needed all 4GB of data stored in tmpfs at once, you would get as much RAM for your applications as feasible.

share|improve this answer

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.