[linux-audio-dev] shared memory tools?

Juhana Sadeharju kouhia at nic.funet.fi
Thu Mar 6 14:21:01 UTC 2003


Hello. I need two functions:

make_shm(int size, char *key)
 -run by root
 -creates a locked shared memory segment
 -returns a key (preferably a string) which is used to
  access the shared memory

char *request_shm(char *key)
 -run by users
 -returns the address of the requested shared memory segment

Could somebody please write these routines to me? Or give good
hints? I have Jack and other codes, but it all is confusing
when the shared memory should be accessed from separate process
which is not fork() of the other.

Should I use mmap() or shm_get() approach?
What then is "/dev/shm"? How to use it?

Best regards,

Juhana



More information about the Linux-audio-dev mailing list