全部博文(64)
分类: LINUX
2009-12-07 09:46:48
glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for POSIX shared memory (shm_open, shm_unlink). Adding the following line to /etc/fstab should take care of this:
tmpfs /dev/shm tmpfs defaults 0 0
Remember to create the directory that you intend to mount tmpfs on if necessary (/dev/shm is automagically created if you use devfs).This mount is _not_ needed for SYSV shared memory.
The internal mount is used for that. (In the 2.3 kernel versions it was necessary to mount the predecessor of tmpfs (shm fs) to use SYSV shared memory)
Red Hat adds the appropriate fstab entry for you (although they use"none" for the first field, which I think is a bit more correct).
cp 10201_clusterware_linux32.zip /dev/shm/a
root@dbtest u01]# free -m
total used free shared buffers cached
Mem: 1519 1511 7 0 106 940
rm /dev/shm/a/10201_clusterware_linux32.zip
root@dbtest a]# free -m
total used free shared buffers cached
Mem: 1519 1294 224 0 106 722