Lines Matching refs:size_t
98 static size_t _real_page_size = ZEND_MM_PAGE_SIZE;
154 (((size_t)(size)) & ((alignment) - 1))
156 (((size_t)(size)) & ~((alignment) - 1))
158 (((size_t)(size) + ((alignment) - 1)) / (alignment))
242 size_t size; /* current memory usage */
243 size_t peak; /* peak memory usage */
247 size_t real_size; /* current size of allocated pages */
250 size_t real_peak; /* peak size of allocated pages */
253 size_t limit; /* memory limit */
270 void *(*_malloc)(size_t);
272 void *(*_realloc)(void*, size_t);
275 void *(*_malloc)(size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
277 void *(*_realloc)(void*, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
315 size_t size;
373 size_t limit, in zend_mm_safe_error()
378 size_t size) in zend_mm_safe_error()
420 static void zend_mm_munmap(void *addr, size_t size) in zend_mm_munmap()
458 static void *zend_mm_mmap_fixed(void *addr, size_t size) in zend_mm_mmap_fixed()
499 static void *zend_mm_mmap(size_t size) in zend_mm_mmap()
706 static zend_always_inline void zend_mm_hugepage(void* ptr, size_t size)
718 static void *zend_mm_chunk_alloc_int(size_t size, size_t alignment)
730 size_t offset;
772 static void *zend_mm_chunk_alloc(zend_mm_heap *heap, size_t size, size_t alignment)
784 static void zend_mm_chunk_free(zend_mm_heap *heap, void *addr, size_t size)
795 static int zend_mm_chunk_truncate(zend_mm_heap *heap, void *addr, size_t old_size, size_t new_size)
814 static int zend_mm_chunk_extend(zend_mm_heap *heap, void *addr, size_t old_size, size_t new_size)
862 static size_t zend_mm_get_huge_block_size(zend_mm_heap *heap, void *ptr ZEND_FILE_LINE_DC ZEND_FILE…
863 static void *zend_mm_alloc_huge(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_OR…
867 static void zend_mm_change_huge_block_size(zend_mm_heap *heap, void *ptr, size_t size, size_t dbg_s…
869 static void zend_mm_change_huge_block_size(zend_mm_heap *heap, void *ptr, size_t size ZEND_FILE_LIN…
877 static void *zend_mm_alloc_pages(zend_mm_heap *heap, uint32_t pages_count, size_t size ZEND_FILE_LI…
1041 size_t size = heap->real_size + ZEND_MM_CHUNK_SIZE;
1042 size_t peak = MAX(heap->real_peak, size);
1085 static zend_always_inline void *zend_mm_alloc_large_ex(zend_mm_heap *heap, size_t size ZEND_FILE_LI…
1095 size_t size = heap->size + pages_count * ZEND_MM_PAGE_SIZE;
1096 size_t peak = MAX(heap->peak, size);
1105 static zend_never_inline void *zend_mm_alloc_large(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D…
1110 static zend_never_inline void *zend_mm_alloc_large(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D…
1214 static zend_always_inline int zend_mm_small_size_to_bin(size_t size)
1304 size_t size = heap->size + bin_data_size[bin_num];
1305 size_t peak = MAX(heap->peak, size);
1347 size_t page_offset = ZEND_MM_ALIGNED_OFFSET(ptr, ZEND_MM_CHUNK_SIZE);
1368 static zend_always_inline void *zend_mm_alloc_heap(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D…
1372 size_t real_size = size;
1415 size_t page_offset = ZEND_MM_ALIGNED_OFFSET(ptr, ZEND_MM_CHUNK_SIZE);
1438 static size_t zend_mm_size(zend_mm_heap *heap, void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
1440 size_t page_offset = ZEND_MM_ALIGNED_OFFSET(ptr, ZEND_MM_CHUNK_SIZE);
1466 …r_inline void *zend_mm_realloc_slow(zend_mm_heap *heap, void *ptr, size_t size, size_t copy_size Z…
1472 size_t orig_peak = heap->peak;
1484 …r_inline void *zend_mm_realloc_huge(zend_mm_heap *heap, void *ptr, size_t size, size_t copy_size Z…
1486 size_t old_size;
1487 size_t new_size;
1489 size_t real_size;
1571 …oid *zend_mm_realloc_heap(zend_mm_heap *heap, void *ptr, size_t size, bool use_copy_size, size_t c…
1573 size_t page_offset;
1574 size_t old_size;
1575 size_t new_size;
1593 size_t real_size = size;
1623 size_t orig_peak = heap->peak;
1693 size_t size = heap->size + (new_size - old_size);
1694 size_t peak = MAX(heap->peak, size);
1729 static void zend_mm_add_huge_block(zend_mm_heap *heap, void *ptr, size_t size, size_t dbg_size ZEND…
1731 static void zend_mm_add_huge_block(zend_mm_heap *heap, void *ptr, size_t size ZEND_FILE_LINE_DC ZEN…
1748 static size_t zend_mm_del_huge_block(zend_mm_heap *heap, void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE…
1754 size_t size;
1772 static size_t zend_mm_get_huge_block_size(zend_mm_heap *heap, void *ptr ZEND_FILE_LINE_DC ZEND_FILE…
1786 static void zend_mm_change_huge_block_size(zend_mm_heap *heap, void *ptr, size_t size, size_t dbg_s…
1788 static void zend_mm_change_huge_block_size(zend_mm_heap *heap, void *ptr, size_t size ZEND_FILE_LIN…
1808 static void *zend_mm_alloc_huge(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_OR…
1815 size_t alignment = MAX(REAL_PAGE_SIZE, ZEND_MM_CHUNK_SIZE);
1817 size_t alignment = REAL_PAGE_SIZE;
1819 size_t new_size = ZEND_MM_ALIGNED_SIZE_EX(size, alignment);
1864 size_t size = heap->real_size + new_size;
1865 size_t peak = MAX(heap->real_peak, size);
1870 size_t size = heap->size + new_size;
1871 size_t peak = MAX(heap->peak, size);
1883 size_t size;
1937 heap->limit = (size_t)Z_L(-1) >> 1;
1950 ZEND_API size_t zend_mm_gc(zend_mm_heap *heap)
1954 size_t page_offset;
1959 size_t collected = 0;
2256 static void *tracked_malloc(size_t size);
2380 ZEND_API void* ZEND_FASTCALL _zend_mm_alloc(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_DC ZEND_…
2390 void* ZEND_FASTCALL _zend_mm_realloc(zend_mm_heap *heap, void *ptr, size_t size ZEND_FILE_LINE_DC Z…
2395 void* ZEND_FASTCALL _zend_mm_realloc2(zend_mm_heap *heap, void *ptr, size_t size, size_t copy_size …
2400 ZEND_API size_t ZEND_FASTCALL _zend_mm_block_size(zend_mm_heap *heap, void *ptr ZEND_FILE_LINE_DC Z…
2415 static size_t alloc_globals_offset;
2472 static ZEND_COLD void* ZEND_FASTCALL _malloc_custom(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_OR…
2490 static ZEND_COLD void* ZEND_FASTCALL _realloc_custom(void *ptr, size_t size ZEND_FILE_LINE_DC ZEND_…
2528 ZEND_API void* ZEND_FASTCALL _emalloc_large(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
2534 ZEND_API void* ZEND_FASTCALL _emalloc_huge(size_t size)
2545 size_t page_offset = ZEND_MM_ALIGNED_OFFSET(ptr, ZEND_MM_CHUNK_SIZE); \
2568 ZEND_API void ZEND_FASTCALL _efree_large(void *ptr, size_t size)
2572 size_t page_offset = ZEND_MM_ALIGNED_OFFSET(ptr, ZEND_MM_CHUNK_SIZE);
2584 ZEND_API void ZEND_FASTCALL _efree_huge(void *ptr, size_t size)
2592 ZEND_API void* ZEND_FASTCALL _emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
2613 ZEND_API void* ZEND_FASTCALL _erealloc(void *ptr, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG…
2623 ZEND_API void* ZEND_FASTCALL _erealloc2(void *ptr, size_t size, size_t copy_size ZEND_FILE_LINE_DC …
2633 ZEND_API size_t ZEND_FASTCALL _zend_mem_block_size(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_…
2643 ZEND_API void* ZEND_FASTCALL _safe_emalloc(size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_…
2648 ZEND_API void* ZEND_FASTCALL _safe_malloc(size_t nmemb, size_t size, size_t offset)
2653 ZEND_API void* ZEND_FASTCALL _safe_erealloc(void *ptr, size_t nmemb, size_t size, size_t offset ZEN…
2658 ZEND_API void* ZEND_FASTCALL _safe_realloc(void *ptr, size_t nmemb, size_t size, size_t offset)
2663 ZEND_API void* ZEND_FASTCALL _ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_OR…
2675 size_t length;
2687 ZEND_API char* ZEND_FASTCALL _estrndup(const char *s, size_t length ZEND_FILE_LINE_DC ZEND_FILE_LIN…
2702 ZEND_API char* ZEND_FASTCALL zend_strndup(const char *s, size_t length)
2720 ZEND_API zend_result zend_set_memory_limit(size_t memory_limit)
2753 ZEND_API size_t zend_memory_usage(bool real_usage)
2759 size_t usage = AG(mm_heap)->size;
2766 ZEND_API size_t zend_memory_peak_usage(bool real_usage)
2798 static zend_always_inline void tracked_add(zend_mm_heap *heap, void *ptr, size_t size) {
2813 static zend_always_inline void tracked_check_limit(zend_mm_heap *heap, size_t add_size) {
2827 static void *tracked_malloc(size_t size)
2854 static void *tracked_realloc(void *ptr, size_t new_size) {
2857 size_t old_size = 0;
2899 mm_heap->limit = (size_t)Z_L(-1) >> 1;
2973 void* (*_malloc)(size_t), argument
2975 void* (*_realloc)(void*, size_t))
2992 void* (**_malloc)(size_t), argument
2994 void* (**_realloc)(void*, size_t))
3017 … void* (*_malloc)(size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC),
3019 … void* (*_realloc)(void*, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC))
3046 ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_handlers *handlers, void *data, size_t data…
3088 heap->limit = (size_t)Z_L(-1) >> 1;
3117 ZEND_API void * __zend_malloc(size_t len)
3126 ZEND_API void * __zend_calloc(size_t nmemb, size_t len)
3136 ZEND_API void * __zend_realloc(void *p, size_t len)
3155 size_t zend_mm_globals_size(void)