[SlugBug] what is /dev/shm ???

Chris J cej at nightwolf.org.uk
Tue Nov 11 14:10:28 GMT 2003


> 
> cat /etc/fstab gives me the following:
> 
> none         /dev/shm         tmpfs   defaults        0 0
> 
> so, is this partition real physical storage or is it a virtual area for 
> temporary files?
> 

It's a virtual filesystem that is used only by the POSIX shared memory
system. glibc 2.2 and higher expects to see this directory for shm_open()
and similar library calls. In older kernels, it was actually mounted with
an fstype of shmfs rather than tmpfs.

> ideally, i would like to transfer files into it as i need to use the 
> space - but i suspect that this is neither possible and/or it's a silly 
> thing to do.

Correct - you can't really use it (or I suspect funny things would happen
you did try). Being a virtual filesystem, it is not using any disk space,
so you'd just chew up memory/swap if you did try and use it (and it was
sucessful).

SysV shared memory has a different API and doesn't require /dev/shm to 
exist - only POSIX shared memory. If in doubt, leave it alone and don't 
try and use it :)

Chris...

-- 
\ Chris Johnson           \
 \ cej at nightwolf.org.uk    ~-----,   
  \ http://cej.nightwolf.org.uk/  ~-----------------------------------, 
   \ Redclaw chat - http://redclaw.org.uk - telnet redclaw.org.uk 2000 \____


More information about the SlugBug mailing list