Implemented file_cache_fallback mechanism
authorAnatol Belski <ab@php.net>
Fri, 9 Oct 2015 21:07:10 +0000 (23:07 +0200)
committerAnatol Belski <ab@php.net>
Fri, 9 Oct 2015 21:47:59 +0000 (23:47 +0200)
commitffb5d0aca30f4730940b6f3265a2f634259ef5b0
tree40e2012f9c7fa10e23477ae432aeacc4c0fead7d
parentd677b25b1c5fba2451ddeedb22cad29e1cda15cb
Implemented file_cache_fallback mechanism

which is essential as an attempt to fix the "failed to reattach"
error on Windows. If file_cache is enabled, Opcache will
automaticaly switch to file_cache_only mode in the case a process
failed to map the shared segment at the required address. The
important small part of the SHM will still be mapped, which
allows information exchange between normal processes using SHM
and those using the fallback mechanism.

This is based on Dmitry's, Matt's and mine ideas. So many thanks for
support!
ext/opcache/ZendAccelerator.c
ext/opcache/ZendAccelerator.h
ext/opcache/shared_alloc_win32.c
ext/opcache/zend_accelerator_module.c
ext/opcache/zend_shared_alloc.c
ext/opcache/zend_shared_alloc.h