diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-11 10:19:50 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-11 10:19:50 +0100 |
commit | d40889e408633dba52ed6b99c9c04a03494e9024 (patch) | |
tree | 10c45b0b0193dab3ee08dc88325e8921be4d5b88 /ext/opcache/shared_alloc_shm.c | |
parent | bf21727ea0be7fc324031d62144c59320a55fd86 (diff) | |
parent | c79ce48ddb2125a3d19723e0fbca1bd770bacab7 (diff) | |
download | php-git-d40889e408633dba52ed6b99c9c04a03494e9024.tar.gz |
Merge branch 'PHP-7.4'
Diffstat (limited to 'ext/opcache/shared_alloc_shm.c')
-rw-r--r-- | ext/opcache/shared_alloc_shm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/opcache/shared_alloc_shm.c b/ext/opcache/shared_alloc_shm.c index 4d93b3f3f8..29225bef21 100644 --- a/ext/opcache/shared_alloc_shm.c +++ b/ext/opcache/shared_alloc_shm.c @@ -60,13 +60,13 @@ static int create_segments(size_t requested_size, zend_shared_segment_shm ***sha int shmget_flags; zend_shared_segment_shm *shared_segments; - seg_allocate_size = SEG_ALLOC_SIZE_MAX; - /* determine segment size we _really_ need: - * no more than to include requested_size - */ - while (requested_size * 2 <= seg_allocate_size && seg_allocate_size > SEG_ALLOC_SIZE_MIN) { - seg_allocate_size >>= 1; - } + seg_allocate_size = SEG_ALLOC_SIZE_MAX; + /* determine segment size we _really_ need: + * no more than to include requested_size + */ + while (requested_size * 2 <= seg_allocate_size && seg_allocate_size > SEG_ALLOC_SIZE_MIN) { + seg_allocate_size >>= 1; + } shmget_flags = IPC_CREAT|SHM_R|SHM_W|IPC_EXCL; |