@@ -71,6 +71,7 @@ ZEND_API void ZEND_FASTCALL _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_
71
71
ZEND_API void * ZEND_FASTCALL _ecalloc (size_t nmemb , size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC ) ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE2 (1 ,2 );
72
72
ZEND_API void * ZEND_FASTCALL _erealloc (void * ptr , size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC ) ZEND_ATTRIBUTE_ALLOC_SIZE (2 );
73
73
ZEND_API void * ZEND_FASTCALL _erealloc2 (void * ptr , size_t size , size_t copy_size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC ) ZEND_ATTRIBUTE_ALLOC_SIZE (2 );
74
+ ZEND_API void * ZEND_FASTCALL _ereallocarray (void * ptr , size_t nmemb , size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC ) ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE2 (2 ,3 );
74
75
ZEND_API void * ZEND_FASTCALL _safe_erealloc (void * ptr , size_t nmemb , size_t size , size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC );
75
76
ZEND_API void * ZEND_FASTCALL _safe_realloc (void * ptr , size_t nmemb , size_t size , size_t offset );
76
77
ZEND_API char * ZEND_FASTCALL _estrdup (const char * s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC ) ZEND_ATTRIBUTE_MALLOC ;
@@ -158,6 +159,7 @@ ZEND_API void ZEND_FASTCALL _efree_huge(void *, size_t size);
158
159
#define ecalloc (nmemb , size ) _ecalloc((nmemb), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
159
160
#define erealloc (ptr , size ) _erealloc((ptr), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
160
161
#define erealloc2 (ptr , size , copy_size ) _erealloc2((ptr), (size), (copy_size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
162
+ #define ereallocarray (ptr , nmemb , size ) _ereallocarray((ptr), (nmemb), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
161
163
#define safe_erealloc (ptr , nmemb , size , offset ) _safe_erealloc((ptr), (nmemb), (size), (offset) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
162
164
#define erealloc_recoverable (ptr , size ) _erealloc((ptr), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
163
165
#define erealloc2_recoverable (ptr , size , copy_size ) _erealloc2((ptr), (size), (copy_size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
@@ -182,6 +184,7 @@ ZEND_API void ZEND_FASTCALL _efree_huge(void *, size_t size);
182
184
ZEND_API void * __zend_malloc (size_t len ) ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE (1 );
183
185
ZEND_API void * __zend_calloc (size_t nmemb , size_t len ) ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE2 (1 ,2 );
184
186
ZEND_API void * __zend_realloc (void * p , size_t len ) ZEND_ATTRIBUTE_ALLOC_SIZE (2 );
187
+ ZEND_API void * __zend_reallocarray (void * p , size_t nmemb , size_t len ) ZEND_ATTRIBUTE_ALLOC_SIZE2 (2 ,3 );
185
188
186
189
/* Selective persistent/non persistent allocation macros */
187
190
#define pemalloc (size , persistent ) ((persistent)?__zend_malloc(size):emalloc(size))
@@ -198,6 +201,7 @@ ZEND_API void * __zend_realloc(void *p, size_t len) ZEND_ATTRIBUTE_ALLOC_SIZE(2)
198
201
#define pecalloc (nmemb , size , persistent ) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc((nmemb), (size)))
199
202
#define perealloc (ptr , size , persistent ) ((persistent)?__zend_realloc((ptr), (size)):erealloc((ptr), (size)))
200
203
#define perealloc2 (ptr , size , copy_size , persistent ) ((persistent)?__zend_realloc((ptr), (size)):erealloc2((ptr), (size), (copy_size)))
204
+ #define pereallocarray (ptr , nmemb , size , persistent ) ((persistent)?__zend_reallocarray((ptr), (nmemb), (size)):ereallocarray((ptr), (nmemb), (size)))
201
205
#define safe_perealloc (ptr , nmemb , size , offset , persistent ) ((persistent)?_safe_realloc((ptr), (nmemb), (size), (offset)):safe_erealloc((ptr), (nmemb), (size), (offset)))
202
206
#define perealloc_recoverable (ptr , size , persistent ) ((persistent)?realloc((ptr), (size)):erealloc_recoverable((ptr), (size)))
203
207
#define perealloc2_recoverable (ptr , size , persistent ) ((persistent)?realloc((ptr), (size)):erealloc2_recoverable((ptr), (size), (copy_size)))
0 commit comments