com php-src: backport 262160e and 2d55e8c into 5.6: ext/opcache/shared_alloc_win32.c

From: Date: Tue, 20 Oct 2015 18:05:44 +0000
Subject: com php-src: backport 262160e and 2d55e8c into 5.6: ext/opcache/shared_alloc_win32.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89475@lists.php.net to get a copy of this message
Commit: ccc95bf9dfc6b66447487ed1e2914c639967ecb1 Author: Anatol Belski <ab@php.net> Tue, 20 Oct 2015 20:05:44 +0200 Parents: d5f76caf6cf334d1bb4ca69662065b3bb34d76c5 Branches: PHP-5.6 PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ccc95bf9dfc6b66447487ed1e2914c639967ecb1 Log: backport 262160e and 2d55e8c into 5.6 Changed paths: M ext/opcache/shared_alloc_win32.c Diff: diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c index cf4bce0..fd5d334 100644 --- a/ext/opcache/shared_alloc_win32.c +++ b/ext/opcache/shared_alloc_win32.c @@ -205,14 +205,19 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_ err = GetLastError(); if (ret == ALLOC_FAIL_MAPPING) { /* Mapping failed, wait for mapping object to get freed and retry */ - CloseHandle(memfile); + CloseHandle(memfile); memfile = NULL; + if (++map_retries >= MAX_MAP_RETRIES) { + break; + } + zend_shared_alloc_unlock_win32(); Sleep(1000 * (map_retries + 1)); + zend_shared_alloc_lock_win32(); } else { zend_shared_alloc_unlock_win32(); return ret; } - } while (++map_retries < MAX_MAP_RETRIES); + } while (1); if (map_retries == MAX_MAP_RETRIES) { zend_shared_alloc_unlock_win32();

« previous php.cvs (#89475) next »