diff options
Diffstat (limited to 'ext/opcache/ZendAccelerator.h')
-rw-r--r-- | ext/opcache/ZendAccelerator.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index c2f95d7c41..bb884d9cc9 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -191,6 +191,12 @@ typedef struct _zend_accel_directives { #ifdef ZEND_WIN32 char *cache_id; #endif +#ifdef HAVE_JIT + zend_long jit; + zend_long jit_buffer_size; + zend_long jit_debug; + zend_long jit_bisect_limit; +#endif } zend_accel_directives; typedef struct _zend_accel_globals { @@ -221,6 +227,9 @@ typedef struct _zend_accel_globals { void *arena_mem; zend_persistent_script *current_persistent_script; zend_bool is_immutable_class; +#ifdef HAVE_JIT + zend_bool jit_enabled; +#endif /* cache to save hash lookup on the same INCLUDE opcode */ const zend_op *cache_opline; zend_persistent_script *cache_persistent_script; @@ -321,4 +330,19 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type); zend_string* ZEND_FASTCALL accel_new_interned_string(zend_string *str); +/* memory write protection */ +#define SHM_PROTECT() \ + do { \ + if (ZCG(accel_directives).protect_memory) { \ + zend_accel_shared_protect(1); \ + } \ + } while (0) + +#define SHM_UNPROTECT() \ + do { \ + if (ZCG(accel_directives).protect_memory) { \ + zend_accel_shared_protect(0); \ + } \ + } while (0) + #endif /* ZEND_ACCELERATOR_H */ |