Lines Matching refs:shm
114 #include <sys/shm.h>
122 char *shm;
130 shm = shmat(ipc_id, NULL, 0);
131 if (shm == (void *)-1) {
137 shmdt(shm);
147 shmdt(shm);
154 strcpy(shm, "hello");
160 strcpy(shm, "bye");
169 if (strcmp(shm, "bye") != 0) {
203 char *shm;
205 shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
206 if (shm == MAP_FAILED) {
210 strcpy(shm, "hello");
216 strcpy(shm, "bye");
225 if (strcmp(shm, "bye") != 0) {
268 char *shm;
271 sprintf(tmpname,"/opcache.test.shm.%dXXXXXX", getpid());
285 shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
286 if (shm == MAP_FAILED) {
292 strcpy(shm, "hello");
298 strcpy(shm, "bye");
307 if (strcmp(shm, "bye") != 0) {