From: Rasmus Lerdorf Date: Tue, 22 Mar 2016 15:04:53 +0000 (-0700) Subject: Disable huge pages in the Zend allocator by default X-Git-Tag: php-7.0.5~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=06c2b318665238dca8d168dab3913d073564ef78;p=php Disable huge pages in the Zend allocator by default As per the discussion on internals, this is an expert feature that needs special system-level configuration and care. --- diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 4cf1178c57..1876559317 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -201,7 +201,7 @@ typedef struct _zend_mm_huge_list zend_mm_huge_list; #endif #ifdef MAP_HUGETLB -int zend_mm_use_huge_pages = 1; +int zend_mm_use_huge_pages = 0; #endif /* @@ -2654,8 +2654,8 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals) #endif #ifdef MAP_HUGETLB tmp = getenv("USE_ZEND_ALLOC_HUGE_PAGES"); - if (tmp && !zend_atoi(tmp, 0)) { - zend_mm_use_huge_pages = 0; + if (tmp && zend_atoi(tmp, 0)) { + zend_mm_use_huge_pages = 1; } #endif ZEND_TSRMLS_CACHE_UPDATE();