| /PHP_TRUNK/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 * TSRMLS_DC) TSRMLS_DC) argument 118 if (nmemb == 0) 129 if ((list2 = malloc(nmemb * size + PSIZE)) == NULL) 133 setup(list1, list2, nmemb, size, cmp TSRMLS_CC); 134 last = list2 + nmemb * size; 229 last = list2 + nmemb*size; 232 memmove(list2, list1, nmemb*size);
|
| /PHP_TRUNK/Zend/ |
| H A D | zend_alloc.h | 58 ZEND_API void *_safe_emalloc(size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; 59 ZEND_API void *_safe_malloc(size_t nmemb, size_t size, size_t offset) ZEND_ATTRIBUTE_MALLOC; 61 ZEND_API void *_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); 63 ZEND_API void *_safe_erealloc(void *ptr, size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); 64 ZEND_API void *_safe_realloc(void *ptr, size_t nmemb, size_t size, size_t offset); 71 #define safe_emalloc(nmemb, size, offset) _safe_emalloc((nmemb), (size), (offset) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) 73 #define ecalloc(nmemb, size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) 75 #define safe_erealloc(ptr, nmemb, siz 103 __zend_calloc(size_t nmemb, size_t len) argument [all...] |
| H A D | zend_qsort.c | 57 ZEND_API void zend_qsort_r(void *base, size_t nmemb, size_t siz, compare_r_func_t compare, void *arg TSRMLS_DC) argument 70 end_stack[0] = (char *) base + ((nmemb - 1) * siz); 121 ZEND_API void zend_qsort(void *base, size_t nmemb, size_t siz, compare_func_t compare TSRMLS_DC) argument 123 zend_qsort_r(base, nmemb, siz, (compare_r_func_t)compare, NULL TSRMLS_CC);
|
| H A D | zend_alloc.c | 2463 static inline size_t safe_address(size_t nmemb, size_t size, size_t offset) argument 2465 size_t res = nmemb; 2475 zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", nmemb, size, offset); 2483 static inline size_t safe_address(size_t nmemb, size_t size, size_t offset) argument 2485 size_t res = nmemb; 2504 zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", nmemb, size, offset); 2512 static inline size_t safe_address(size_t nmemb, size_t size, size_t offset) argument 2519 : "r"(nmemb), 2525 zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", nmemb, size, offset); 2533 static inline size_t safe_address(size_t nmemb, size_ argument 2553 safe_address(size_t nmemb, size_t size, size_t offset) argument 2566 safe_address(size_t nmemb, size_t size, size_t offset) argument 2581 _safe_emalloc(size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) argument 2586 _safe_malloc(size_t nmemb, size_t size, size_t offset) argument 2591 _safe_erealloc(void *ptr, size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) argument 2596 _safe_realloc(void *ptr, size_t nmemb, size_t size, size_t offset) argument 2602 _ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) argument [all...] |
| /PHP_TRUNK/ext/mysqlnd/ |
| H A D | mysqlnd_alloc.c | 160 void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) argument 181 ret = _ecalloc(nmemb, REAL_SIZE(size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC); 201 void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D) argument 220 ret = (persistent) ? __zend_calloc(nmemb, REAL_SIZE(size)) : _ecalloc(nmemb, REAL_SIZE(size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC); 430 void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) argument 450 ret = calloc(nmemb, REAL_SIZE(size)); 663 static void * mysqlnd_zend_mm_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) argument 665 return ecalloc(nmemb, size); 671 static void * mysqlnd_zend_mm_pecalloc(unsigned int nmemb, size_ argument 719 mysqlnd_zend_mm_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) argument [all...] |
| /PHP_TRUNK/ext/curl/ |
| H A D | interface.c | 1258 static size_t curl_write_nothing(char *data, size_t size, size_t nmemb, void *ctx) argument 1260 return size * nmemb; 1266 static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx) argument 1270 size_t length = size * nmemb; 1275 fprintf(stderr, "data = %s, size = %d, nmemb = %d, ctx = %x\n", data, size, nmemb, ctx); 1283 return fwrite(data, size, nmemb, t->fp); 1488 static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx) argument 1497 length = fread(data, size, nmemb, t->fp); 1518 ZVAL_LONG(zlength, (int) size * nmemb); local 1563 curl_write_header(char *data, size_t size, size_t nmemb, void *ctx) argument [all...] |
| /PHP_TRUNK/ext/sockets/ |
| H A D | conversions.c | 124 static inline void *accounted_ecalloc(size_t nmemb, size_t alloc_size, ser_context *ctx) argument 126 void *ret = ecalloc(nmemb, alloc_size); 130 static inline void *accounted_safe_ecalloc(size_t nmemb, size_t alloc_size, size_t offset, ser_context *ctx) argument 132 void *ret = safe_emalloc(nmemb, alloc_size, offset); 133 memset(ret, '\0', nmemb * alloc_size + offset);
|