diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index befcbe442ab..6354c2e15ea 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -272,7 +272,7 @@ int zend_shared_alloc_startup(size_t requested_size, size_t reserved_size) free(ZSMMG(shared_segments)); ZSMMG(shared_segments) = tmp_shared_segments; - ZSMMG(shared_memory_state).positions = (int *)zend_shared_alloc(sizeof(int) * ZSMMG(shared_segments_count)); + ZSMMG(shared_memory_state).positions = (size_t *)zend_shared_alloc(sizeof(size_t) * ZSMMG(shared_segments_count)); if (!ZSMMG(shared_memory_state).positions) { zend_accel_error_noreturn(ACCEL_LOG_FATAL, "Insufficient shared memory!"); return ALLOC_FAILURE; diff --git a/ext/opcache/zend_shared_alloc.h b/ext/opcache/zend_shared_alloc.h index ac7ec3e33f3..1283351f2e1 100644 --- a/ext/opcache/zend_shared_alloc.h +++ b/ext/opcache/zend_shared_alloc.h @@ -95,7 +95,7 @@ typedef struct _handler_entry { } zend_shared_memory_handler_entry; typedef struct _zend_shared_memory_state { - int *positions; /* current positions for each segment */ + size_t *positions; /* current positions for each segment */ size_t shared_free; /* amount of free shared memory */ } zend_shared_memory_state;