com php-src: Fixed bug #76832 ZendOPcache.MemoryBase periodically deleted by the OS: ext/opcache/shared_alloc_win32.c
| From: | Anatol Belski | Date: | Mon, 03 Sep 2018 13:09:23 +0000 |
| Subject: | com php-src: Fixed bug #76832 ZendOPcache.MemoryBase periodically deleted by the OS: ext/opcache/shared_alloc_win32.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102971@lists.php.net to get a copy of this message | ||
Commit: f26172f9343cf49d62bbefff355bb76d6adf7ebe
Author: Anatol Belski <ab@php.net> Mon, 3 Sep 2018 15:09:23 +0200
Parents: 7fde2243a712bb1cdc0b07cef2ba5ce13ec5259b
Branches: PHP-7.1 PHP-7.2 PHP-7.3 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f26172f9343cf49d62bbefff355bb76d6adf7ebe
Log:
Fixed bug #76832 ZendOPcache.MemoryBase periodically deleted by the OS
Bugs:
https://bugs.php.net/76832
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 89b5df3..5207a59 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 ||