[linux-audio-dev] Shared memory?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] Shared memory?
From: Juhana Sadeharju (kouhia_AT_nic.funet.fi)
Date: Thu Jul 03 2003 - 17:27:28 EEST


Hello. I have problems in getting a shared memory to work.
What works is my shmalloc() which is used for sharing memory
over fork(). What does not work is sharing memory between
arbitrary processes. This latter uses ftok() with a pathname
(e.g., "/tmp/globalshm") in identifying the shared memory.
Each process uses the pathname for gaining access to the shared
memory.

The simple example in "http://www.funet.fi/~kouhia/shmserver.tar.gz"
does not work. It looks like shmserver creates the shared memory,
but shmclient cannot find it.

I use now shmget() but I have also used mmap() for shared memory.
I don't remember the reason why I moved from mmap() to shmget().
Were there any limitations?

What then is the "/dev/shm" seen in the "df" listing? How that is
used?

Best regards,

Juhana


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jul 03 2003 - 17:36:35 EEST