FAQ
Commit: 1efcdaf092a8e26342b67f2c7765be25dd459b4b
Author: Rasmus Lerdorf <rasmus@lerdorf.com> Tue, 22 Mar 2016 08:04:53 -0700
Parents: b49ec68134688edff0ae095dd09656dd3430f527
Branches: PHP-7.0

Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1efcdaf092a8e26342b67f2c7765be25dd459b4b

Log:
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.

Changed paths:
   M NEWS
   M Zend/zend_alloc.c


Diff:
diff --git a/NEWS b/NEWS
index 8f32f46..9840730 100644
--- a/NEWS
+++ b/NEWS
@@ -2,9 +2,10 @@ PHP NEWS
  ?? ??? 2016 PHP 7.0.6

-- Core:
- . Added ability to disable huge pages in Zend Memory Manager through
- the environment variable USE_ZEND_ALLOC_HUGE_PAGES=0. (Dmitry)
+- Core:
+ . Huge pages disabled by default. (Rasmus)
+ . Added ability to enable huge pages in Zend Memory Manager through
+ the environment variable USE_ZEND_ALLOC_HUGE_PAGES=1. (Dmitry)
    . Fixed Bug #71859 (zend_objects_store_call_destructors operates on realloced
      memory, crashing). (Laruence)
    . Fixed bug #71841 (EG(error_zval) is not handled well). (Laruence)
@@ -18,7 +19,7 @@ PHP NEWS

  - Curl:
    . Fixed bug #71831 (CURLOPT_NOPROXY applied as long instead of string).
- (Michael Sierks)
+ (Michael Sierks)

  - ODBC:
    . Fixed bug #63171 (Script hangs after max_execution_time). (Remi)
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 4cf1178..1876559 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();

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupphp-cvs @
categoriesphp
postedMar 22, '16 at 3:06p
activeMar 22, '16 at 3:06p
posts1
users1
websitephp.net

1 user in discussion

Rasmus Lerdorf: 1 post

People

Translate

site design / logo © 2017 Grokbase