From b1a30d8ab16fb8c18f70354668fbab3e3e2396e2 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" <cmbecker69@gmx.de> Date: Sat, 28 Nov 2020 13:50:14 +0100 Subject: [PATCH] Fix typos in comments --- ext/opcache/shared_alloc_win32.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c index 06df5270d4..780fd78f89 100644 --- a/ext/opcache/shared_alloc_win32.c +++ b/ext/opcache/shared_alloc_win32.c @@ -142,7 +142,7 @@ static int zend_shared_alloc_reattach(size_t requested_size, char **error_in) } pre_size = ZEND_ALIGNED_SIZE(sizeof(zend_smm_shared_globals)) + ZEND_ALIGNED_SIZE(sizeof(zend_shared_segment)) + ZEND_ALIGNED_SIZE(sizeof(void *)) + ZEND_ALIGNED_SIZE(sizeof(int)); - /* Map only part of SHM to have access opcache shared globals */ + /* Map only part of SHM to have access to opcache shared globals */ mapping_base = MapViewOfFileEx(memfile, FILE_MAP_ALL_ACCESS, 0, 0, pre_size + ZEND_ALIGNED_SIZE(sizeof(zend_accel_shared_globals)), NULL); if (mapping_base == NULL) { err = GetLastError(); @@ -210,7 +210,7 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_ zend_shared_alloc_lock_win32(); /* Mapping retries: When Apache2 restarts, the parent process startup routine - can be called before the child process is killed. In this case, the map will fail + can be called before the child process is killed. In this case, the mapping will fail and we have to sleep some time (until the child releases the mapping object) and retry.*/ do { memfile = OpenFileMapping(FILE_MAP_READ|FILE_MAP_WRITE|FILE_MAP_EXECUTE, 0, create_name_with_username(ACCEL_FILEMAP_NAME)); @@ -267,15 +267,15 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_ return ALLOC_FAILURE; } - /* Starting from windows Vista, heap randomization occurs which might cause our mapping base to - be taken (fail to map). So under Vista, we try to map into a hard coded predefined addresses + /* Starting from Windows Vista, heap randomization occurs which might cause our mapping base to + be taken (fail to map). So we try to map into one of the hard coded predefined addresses in high memory. */ if (!ZCG(accel_directives).mmap_base || !*ZCG(accel_directives).mmap_base) { wanted_mapping_base = vista_mapping_base_set; } else { char *s = ZCG(accel_directives).mmap_base; - /* skip leading 0x, %p assumes hexdeciaml format anyway */ + /* skip leading 0x, %p assumes hexdecimal format anyway */ if (*s == '0' && *(s + 1) == 'x') { s += 2; } -- 2.40.0