Lines Matching refs:shm
120 #include <sys/shm.h>
128 char *shm;
136 shm = shmat(ipc_id, NULL, 0);
137 if (shm == (void *)-1) {
143 shmdt(shm);
153 shmdt(shm);
160 strcpy(shm, "hello");
166 strcpy(shm, "bye");
175 if (strcmp(shm, "bye") != 0) {
206 char *shm;
208 shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
209 if (shm == MAP_FAILED) {
213 strcpy(shm, "hello");
219 strcpy(shm, "bye");
228 if (strcmp(shm, "bye") != 0) {
269 char *shm;
272 sprintf(tmpname,"/opcache.test.shm.%dXXXXXX", getpid());
286 shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
287 if (shm == MAP_FAILED) {
293 strcpy(shm, "hello");
299 strcpy(shm, "bye");
308 if (strcmp(shm, "bye") != 0) {