summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-09-03 15:09:23 +0200
committerAnatol Belski <ab@php.net>2018-09-03 15:09:23 +0200
commitf26172f9343cf49d62bbefff355bb76d6adf7ebe (patch)
tree16c5f891f9ffea0a8dd73f95ae5c1a0c88b03d7b
parent7fde2243a712bb1cdc0b07cef2ba5ce13ec5259b (diff)
downloadphp-git-f26172f9343cf49d62bbefff355bb76d6adf7ebe.tar.gz
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 ||