Patch PHP7_huge_2mb_flag.patch for opcache Bug #79027
Patch version 2019-12-31 12:37 UTC
Return to Bug #79027 |
Download this patch
Patch Revisions:
Developer: chris@neadwerx.com
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 52276010af..1015603066 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -2638,7 +2638,11 @@ static int accel_remap_huge_pages(void *start, size_t size, const char *name, si
# ifdef MAP_HUGETLB
ret = mmap(start, size,
PROT_READ | PROT_WRITE | PROT_EXEC,
- MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED | MAP_HUGETLB,
+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED | MAP_HUGETLB
+# ifdef MAP_HUGE_2MB
+ | MAP_HUGE_2MB
+# endif
+ ,
-1, 0);
# endif
if (ret == MAP_FAILED) {
|