Skip to content

Instantly share code, notes, and snippets.

@cmb69
Created March 17, 2019 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmb69/80e2ecc2d46f5255a315a268fcdd6f94 to your computer and use it in GitHub Desktop.
Save cmb69/80e2ecc2d46f5255a315a268fcdd6f94 to your computer and use it in GitHub Desktop.
No auto address mapping
ext/opcache/shared_alloc_win32.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c
index 5207a59812..ab268a510c 100644
--- a/ext/opcache/shared_alloc_win32.c
+++ b/ext/opcache/shared_alloc_win32.c
@@ -310,11 +310,12 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
}
}
+ shared_segment->p = mapping_base = NULL;
do {
- shared_segment->p = mapping_base = MapViewOfFileEx(memfile, FILE_MAP_ALL_ACCESS, 0, 0, 0, *wanted_mapping_base);
if (*wanted_mapping_base == NULL) { /* Auto address (NULL) is the last option on the array */
break;
}
+ shared_segment->p = mapping_base = MapViewOfFileEx(memfile, FILE_MAP_ALL_ACCESS, 0, 0, 0, *wanted_mapping_base);
wanted_mapping_base++;
} while (!mapping_base);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment