Lines Matching refs:shared_segment
41 zend_shared_segment_posix *shared_segment; in create_segments() local
50 shared_segment = (zend_shared_segment_posix *)((char *)(*shared_segments_p) + sizeof(void *)); in create_segments()
51 (*shared_segments_p)[0] = shared_segment; in create_segments()
54 shared_segment->shm_fd = shm_open(shared_segment_name, O_RDWR|O_CREAT|O_TRUNC, 0600); in create_segments()
55 if (shared_segment->shm_fd == -1) { in create_segments()
60 if (ftruncate(shared_segment->shm_fd, requested_size) != 0) { in create_segments()
66 …shared_segment->common.p = mmap(0, requested_size, PROT_READ | PROT_WRITE, MAP_SHARED, shared_segm… in create_segments()
67 if (shared_segment->common.p == MAP_FAILED) { in create_segments()
74 shared_segment->common.pos = 0; in create_segments()
75 shared_segment->common.size = requested_size; in create_segments()
80 static int detach_segment(zend_shared_segment_posix *shared_segment) in detach_segment() argument
82 munmap(shared_segment->common.p, shared_segment->common.size); in detach_segment()
83 close(shared_segment->shm_fd); in detach_segment()