Lines Matching refs:shm
116 #include <sys/shm.h>
124 char *shm;
132 shm = shmat(ipc_id, NULL, 0);
133 if (shm == (void *)-1) {
139 shmdt(shm);
149 shmdt(shm);
156 strcpy(shm, "hello");
162 strcpy(shm, "bye");
171 if (strcmp(shm, "bye") != 0) {
202 char *shm;
204 shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
205 if (shm == MAP_FAILED) {
209 strcpy(shm, "hello");
215 strcpy(shm, "bye");
224 if (strcmp(shm, "bye") != 0) {
265 char *shm;
268 sprintf(tmpname,"/opcache.test.shm.%dXXXXXX", getpid());
282 shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
283 if (shm == MAP_FAILED) {
289 strcpy(shm, "hello");
295 strcpy(shm, "bye");
304 if (strcmp(shm, "bye") != 0) {