summaryrefslogtreecommitdiff
path: root/ext/opcache/zend_shared_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/opcache/zend_shared_alloc.c')
-rw-r--r--ext/opcache/zend_shared_alloc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c
index 8a60d75736..43a0263ee5 100644
--- a/ext/opcache/zend_shared_alloc.c
+++ b/ext/opcache/zend_shared_alloc.c
@@ -288,7 +288,7 @@ static size_t zend_shared_alloc_get_largest_free_block(void)
#define MIN_FREE_MEMORY 64*1024
#define SHARED_ALLOC_FAILED() do { \
- zend_accel_error(ACCEL_LOG_WARNING, "Not enough free shared space to allocate %pd bytes (%pd bytes free)", (zend_int_t)size, (zend_int_t)ZSMMG(shared_free)); \
+ zend_accel_error(ACCEL_LOG_WARNING, "Not enough free shared space to allocate %pd bytes (%pd bytes free)", (zend_long)size, (zend_long)ZSMMG(shared_free)); \
if (zend_shared_alloc_get_largest_free_block() < MIN_FREE_MEMORY) { \
ZSMMG(memory_exhausted) = 1; \
} \
@@ -327,7 +327,7 @@ int zend_shared_memdup_size(void *source, size_t size)
{
void *old_p;
- if ((old_p = zend_hash_index_find_ptr(&xlat_table, (zend_uint_t)source)) != NULL) {
+ if ((old_p = zend_hash_index_find_ptr(&xlat_table, (zend_ulong)source)) != NULL) {
/* we already duplicated this pointer */
return 0;
}
@@ -339,11 +339,11 @@ void *_zend_shared_memdup(void *source, size_t size, zend_bool free_source TSRML
{
void *old_p, *retval;
- if ((old_p = zend_hash_index_find_ptr(&xlat_table, (zend_uint_t)source)) != NULL) {
+ if ((old_p = zend_hash_index_find_ptr(&xlat_table, (zend_ulong)source)) != NULL) {
/* we already duplicated this pointer */
return old_p;
}
- retval = ZCG(mem);;
+ retval = ZCG(mem);
ZCG(mem) = (void*)(((char*)ZCG(mem)) + ZEND_ALIGNED_SIZE(size));
memcpy(retval, source, size);
if (free_source) {
@@ -431,14 +431,14 @@ void zend_shared_alloc_clear_xlat_table(void)
void zend_shared_alloc_register_xlat_entry(const void *old, const void *new)
{
- zend_hash_index_update_ptr(&xlat_table, (zend_uint_t)old, (void*)new);
+ zend_hash_index_update_ptr(&xlat_table, (zend_ulong)old, (void*)new);
}
void *zend_shared_alloc_get_xlat_entry(const void *old)
{
void *retval;
- if ((retval = zend_hash_index_find_ptr(&xlat_table, (zend_uint_t)old)) == NULL) {
+ if ((retval = zend_hash_index_find_ptr(&xlat_table, (zend_ulong)old)) == NULL) {
return NULL;
}
return retval;