/PHP-7.0/Zend/ |
H A D | zend_multiply.h | 124 size_t res = nmemb; in zend_safe_address() 145 size_t res = nmemb; in zend_safe_address() 180 : "r"(nmemb), in zend_safe_address() 202 : "r"(nmemb), in zend_safe_address() 226 : "r"(nmemb), in zend_safe_address() 242 uint64_t res = (uint64_t) nmemb * (uint64_t) size + (uint64_t) offset; in zend_safe_address() 256 size_t res = nmemb * size + offset; in zend_safe_address() 257 double _d = (double)nmemb * (double)size + (double)offset; in zend_safe_address() 269 static zend_always_inline size_t zend_safe_address_guarded(size_t nmemb, size_t size, size_t offset) in zend_safe_address_guarded() argument 272 size_t ret = zend_safe_address(nmemb, size, offset, &overflow); in zend_safe_address_guarded() [all …]
|
H A D | zend_alloc.h | 83 ZEND_API void* ZEND_FASTCALL _safe_realloc(void *ptr, size_t nmemb, size_t size, size_t offset); 162 #define safe_emalloc(nmemb, size, offset) _safe_emalloc((nmemb), (size), (offset) ZEND_FILE_LINE_CC… argument 166 #define ecalloc(nmemb, size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) argument 169 #define safe_erealloc(ptr, nmemb, size, offset) _safe_erealloc((ptr), (nmemb), (size), (offset) ZEN… argument 178 #define safe_emalloc_rel(nmemb, size, offset) _safe_emalloc((nmemb), (size), (offset) ZEND_FILE_LIN… argument 180 #define ecalloc_rel(nmemb, size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE… argument 185 #define safe_erealloc_rel(ptr, nmemb, size, offset) _safe_erealloc((ptr), (nmemb), (size), (offset)… argument 196 #define safe_pemalloc(nmemb, size, offset, persistent) ((persistent)?_safe_malloc(nmemb, size, offs… argument 199 #define pecalloc(nmemb, size, persistent) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc((nme… argument 202 …perealloc(ptr, nmemb, size, offset, persistent) ((persistent)?_safe_realloc((ptr), (nmemb), (size)… argument [all …]
|
H A D | zend_sort.h | 26 ZEND_API void zend_qsort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp); 27 ZEND_API void zend_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp); 28 ZEND_API void zend_insert_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_…
|
H A D | zend_sort.c | 41 end_stack[0] = (char *) base + ((nmemb - 1) * siz); in zend_qsort() 154 switch (nmemb) { in zend_insert_sort() 180 char *end = start + (nmemb * siz); in zend_insert_sort() 317 ZEND_API void zend_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp) in zend_sort() argument 320 if (nmemb <= 16) { in zend_sort() 321 zend_insert_sort(base, nmemb, siz, cmp, swp); in zend_sort() 326 char *end = start + (nmemb * siz); in zend_sort() 327 size_t offset = (nmemb >> Z_L(1)); in zend_sort() 330 if ((nmemb >> Z_L(10))) { in zend_sort() 368 nmemb = (end - i)/siz; in zend_sort() [all …]
|
H A D | zend_alloc.c | 2532 return emalloc_rel(zend_safe_address_guarded(nmemb, size, offset)); 2535 ZEND_API void* ZEND_FASTCALL _safe_malloc(size_t nmemb, size_t size, size_t offset) argument 2537 return pemalloc(zend_safe_address_guarded(nmemb, size, offset), 1); 2542 return erealloc_rel(ptr, zend_safe_address_guarded(nmemb, size, offset)); 2545 ZEND_API void* ZEND_FASTCALL _safe_realloc(void *ptr, size_t nmemb, size_t size, size_t offset) argument 2547 return perealloc(ptr, zend_safe_address_guarded(nmemb, size, offset), 1); 2555 p = _safe_emalloc(nmemb, size, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); 2559 memset(p, 0, size * nmemb); 2889 ZEND_API void * __zend_calloc(size_t nmemb, size_t len) argument 2891 void *tmp = _safe_malloc(nmemb, len, 0); [all …]
|
/PHP-7.0/ext/mysqlnd/ |
H A D | mysqlnd_alloc.h | 33 void * (*m_ecalloc)(unsigned int nmemb, size_t size MYSQLND_MEM_D); 34 void * (*m_pecalloc)(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D); 40 void * (*m_calloc)(unsigned int nmemb, size_t size MYSQLND_MEM_D); 54 PHPAPI void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D); 55 PHPAPI void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D… 61 PHPAPI void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D); 72 #define mnd_ecalloc(nmemb, size) mysqlnd_allocator.m_ecalloc((nmemb), (size) MYSQLND_MEM_C) argument 73 #define mnd_pecalloc(nmemb, size, p) mysqlnd_allocator.m_pecalloc((nmemb), (size), (p) MYSQLND_MEM_… argument 79 #define mnd_calloc(nmemb, size) mysqlnd_allocator.m_calloc((nmemb), (size) MYSQLND_MEM_C) argument
|
H A D | mysqlnd_alloc.c | 160 void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) in _mysqlnd_ecalloc() argument 181 ret = _ecalloc(nmemb, REAL_SIZE(size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC); in _mysqlnd_ecalloc() 201 void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D) in _mysqlnd_pecalloc() argument 220 …ret = (persistent) ? __zend_calloc(nmemb, REAL_SIZE(size)) : _ecalloc(nmemb, REAL_SIZE(size) ZEND_… in _mysqlnd_pecalloc() 430 void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) in _mysqlnd_calloc() argument 450 ret = calloc(nmemb, REAL_SIZE(size)); in _mysqlnd_calloc() 663 static void * mysqlnd_zend_mm_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) in mysqlnd_zend_mm_ecalloc() argument 665 return ecalloc(nmemb, size); in mysqlnd_zend_mm_ecalloc() 673 return pecalloc(nmemb, size, persistent); in mysqlnd_zend_mm_pecalloc() 719 static void * mysqlnd_zend_mm_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) in mysqlnd_zend_mm_calloc() argument [all …]
|
/PHP-7.0/ext/gd/libgd/ |
H A D | gdhelpers.h | 15 #define gdCalloc(nmemb, size) ecalloc(nmemb, size) argument
|
/PHP-7.0/main/ |
H A D | mergesort.c | 105 PHPAPI int php_mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void… in php_mergesort() argument 118 if (nmemb == 0) in php_mergesort() 129 if ((list2 = malloc(nmemb * size + PSIZE)) == NULL) in php_mergesort() 133 setup(list1, list2, nmemb, size, cmp); in php_mergesort() 134 last = list2 + nmemb * size; in php_mergesort() 229 last = list2 + nmemb*size; in php_mergesort() 232 memmove(list2, list1, nmemb*size); in php_mergesort()
|
H A D | php.h | 327 PHPAPI int php_mergesort(void *base, size_t nmemb, register size_t size, int (*cmp)(const void *, c…
|
/PHP-7.0/ext/curl/ |
H A D | interface.c | 1416 return size * nmemb; in curl_write_nothing() 1422 static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx) in curl_write() argument 1426 size_t length = size * nmemb; in curl_write() 1438 return fwrite(data, size, nmemb, t->fp); in curl_write() 1597 static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx) in curl_read() argument 1606 length = fread(data, size, nmemb, t->fp); in curl_read() 1623 ZVAL_LONG(&argv[2], (int)size * nmemb); in curl_read() 1646 length = MIN((int) (size * nmemb), Z_STRLEN(retval)); in curl_read() 1665 static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx) in curl_write_header() argument 1669 size_t length = size * nmemb; in curl_write_header() [all …]
|
/PHP-7.0/ext/sockets/ |
H A D | conversions.c | 124 static inline void *accounted_ecalloc(size_t nmemb, size_t alloc_size, ser_context *ctx) in accounted_ecalloc() argument 126 void *ret = ecalloc(nmemb, alloc_size); in accounted_ecalloc() 130 static inline void *accounted_safe_ecalloc(size_t nmemb, size_t alloc_size, size_t offset, ser_cont… in accounted_safe_ecalloc() argument 132 void *ret = safe_emalloc(nmemb, alloc_size, offset); in accounted_safe_ecalloc() 133 memset(ret, '\0', nmemb * alloc_size + offset); in accounted_safe_ecalloc()
|