Skip to content

Commit f26172f

Browse files
committed
Fixed bug #76832 ZendOPcache.MemoryBase periodically deleted by the OS
1 parent 7fde224 commit f26172f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/opcache/shared_alloc_win32.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "ZendAccelerator.h"
2323
#include "zend_shared_alloc.h"
2424
#include "zend_accelerator_util_funcs.h"
25+
#include "tsrm_win32.h"
2526
#include <winbase.h>
2627
#include <process.h>
2728
#include <LMCONS.H>
@@ -159,6 +160,12 @@ static int zend_shared_alloc_reattach(size_t requested_size, char **error_in)
159160
return ALLOC_FAILURE;
160161
}
161162
fclose(fp);
163+
164+
if (0 > win32_utime(mmap_base_file, NULL)) {
165+
err = GetLastError();
166+
zend_win_error_message(ACCEL_LOG_WARNING, mmap_base_file, err);
167+
}
168+
162169
/* Check if the requested address space is free */
163170
if (VirtualQuery(wanted_mapping_base, &info, sizeof(info)) == 0 ||
164171
info.State != MEM_FREE ||

0 commit comments

Comments
 (0)