summaryrefslogtreecommitdiff
path: root/ext/opcache/zend_shared_alloc.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-20 00:23:37 +0200
committerAnatol Belski <ab@php.net>2014-08-20 00:23:37 +0200
commit476bdbf85b86a3664ac81b5bca3e3899475f16de (patch)
tree9215eb4349d1b64ce9a130505ad2ddcc24de3b6d /ext/opcache/zend_shared_alloc.c
parent61c8af6a9d4376e5f233db775e4a0ebf47942830 (diff)
downloadphp-git-476bdbf85b86a3664ac81b5bca3e3899475f16de.tar.gz
ported opcache
Diffstat (limited to 'ext/opcache/zend_shared_alloc.c')
-rw-r--r--ext/opcache/zend_shared_alloc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c
index 0faabee8b2..8a60d75736 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 %ld bytes (%ld bytes free)", (long)size, (long)ZSMMG(shared_free)); \
+ 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)); \
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, (ulong)source)) != NULL) {
+ if ((old_p = zend_hash_index_find_ptr(&xlat_table, (zend_uint_t)source)) != NULL) {
/* we already duplicated this pointer */
return 0;
}
@@ -339,7 +339,7 @@ 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, (ulong)source)) != NULL) {
+ if ((old_p = zend_hash_index_find_ptr(&xlat_table, (zend_uint_t)source)) != NULL) {
/* we already duplicated this pointer */
return old_p;
}
@@ -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, (ulong)old, (void*)new);
+ zend_hash_index_update_ptr(&xlat_table, (zend_uint_t)old, (void*)new);
}
void *zend_shared_alloc_get_xlat_entry(const void *old)
{
void *retval;
- if ((retval = zend_hash_index_find_ptr(&xlat_table, (ulong)old)) == NULL) {
+ if ((retval = zend_hash_index_find_ptr(&xlat_table, (zend_uint_t)old)) == NULL) {
return NULL;
}
return retval;