diff options
Diffstat (limited to 'ext/opcache/ZendAccelerator.c')
-rw-r--r-- | ext/opcache/ZendAccelerator.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 0bdee2bfe0..56651f2d4c 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -305,7 +305,9 @@ static inline int accel_restart_is_active(void) static inline int accel_activate_add(void) { #ifdef ZEND_WIN32 + SHM_UNPROTECT(); INCREMENT(mem_usage); + SHM_PROTECT(); #else struct flock mem_usage_lock; @@ -327,8 +329,10 @@ static inline void accel_deactivate_sub(void) { #ifdef ZEND_WIN32 if (ZCG(counted)) { + SHM_UNPROTECT(); DECREMENT(mem_usage); ZCG(counted) = 0; + SHM_PROTECT(); } #else struct flock mem_usage_unlock; |