summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-09-03 15:10:25 +0200
committerAnatol Belski <ab@php.net>2018-09-03 15:10:25 +0200
commita6b8651d94839986be4c3ced42f178524c7de5e2 (patch)
tree9b0f27857318e55f899d69cfef684e42d2d72e16
parentaccf5ed621eea200551b9030d69cf7926560340b (diff)
parentf26172f9343cf49d62bbefff355bb76d6adf7ebe (diff)
downloadphp-git-a6b8651d94839986be4c3ced42f178524c7de5e2.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Fixed bug #76832 ZendOPcache.MemoryBase periodically deleted by the OS
-rw-r--r--ext/opcache/shared_alloc_win32.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c
index 89b5df3eef..5207a59812 100644
--- a/ext/opcache/shared_alloc_win32.c
+++ b/ext/opcache/shared_alloc_win32.c
@@ -22,6 +22,7 @@
#include "ZendAccelerator.h"
#include "zend_shared_alloc.h"
#include "zend_accelerator_util_funcs.h"
+#include "tsrm_win32.h"
#include <winbase.h>
#include <process.h>
#include <LMCONS.H>
@@ -159,6 +160,12 @@ static int zend_shared_alloc_reattach(size_t requested_size, char **error_in)
return ALLOC_FAILURE;
}
fclose(fp);
+
+ if (0 > win32_utime(mmap_base_file, NULL)) {
+ err = GetLastError();
+ zend_win_error_message(ACCEL_LOG_WARNING, mmap_base_file, err);
+ }
+
/* Check if the requested address space is free */
if (VirtualQuery(wanted_mapping_base, &info, sizeof(info)) == 0 ||
info.State != MEM_FREE ||