summaryrefslogtreecommitdiff
path: root/Zend/zend_smart_str.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-11-21 19:38:53 +0100
committerAnatol Belski <ab@php.net>2017-11-21 19:38:53 +0100
commit12b2c2f5f9f3f31f6276aac35365932d9032e839 (patch)
treeb2e3e879437c02c03626dae1c6c54f36b5c1715f /Zend/zend_smart_str.c
parent6b54b3409a46119bc702af5d905718a88a0115a3 (diff)
downloadphp-git-12b2c2f5f9f3f31f6276aac35365932d9032e839.tar.gz
Switch to ZMM routines, closes #2917
Diffstat (limited to 'Zend/zend_smart_str.c')
-rw-r--r--Zend/zend_smart_str.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_smart_str.c b/Zend/zend_smart_str.c
index 74feea47b6..cf7c40b283 100644
--- a/Zend/zend_smart_str.c
+++ b/Zend/zend_smart_str.c
@@ -52,7 +52,7 @@ ZEND_API void ZEND_FASTCALL smart_str_realloc(smart_str *str, size_t len)
ZSTR_LEN(str->s) = 0;
} else {
str->a = SMART_STR_NEW_LEN(len);
- str->s = (zend_string *) realloc(str->s, str->a + _ZSTR_HEADER_SIZE + 1);
+ str->s = (zend_string *) perealloc(str->s, str->a + _ZSTR_HEADER_SIZE + 1, 1);
}
}
@@ -135,14 +135,14 @@ ZEND_API void ZEND_FASTCALL _smart_string_alloc_persistent(smart_string *str, si
} else {
str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OVERHEAD;
}
- str->c = malloc(str->a + 1);
+ str->c = pemalloc(str->a + 1, 1);
} else {
if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) {
zend_error(E_ERROR, "String size overflow");
}
len += str->len;
str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OVERHEAD;
- str->c = realloc(str->c, str->a + 1);
+ str->c = perealloc(str->c, str->a + 1, 1);
}
}