File: shared_mem_comms

package info (click to toggle)
prads 0.3.3-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,636 kB
  • sloc: ansic: 10,215; perl: 1,689; sql: 204; makefile: 152; sh: 144; python: 20
file content (19 lines) | stat: -rw-r--r-- 459 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
this is a design document for things to come
probably meaningless to most

ipc - interprocess communication
copyless memory passing of asset data

minimize memory copies by storing struct in shmem heap

shmat 
       #include <sys/types.h>
       #include <sys/shm.h>

       void *shmat(int shmid, const void *shmaddr, int shmflg);

       int shmdt(const void *shmaddr);

// grab a page locked in memory - SHM_RDONLY if reader
shmat(31337, NULL, SHM_RND);