Lines Matching refs:new_size

795 static int zend_mm_chunk_truncate(zend_mm_heap *heap, void *addr, size_t old_size, size_t new_size)  argument
800 return heap->storage->handlers.chunk_truncate(heap->storage, addr, old_size, new_size);
807 zend_mm_munmap((char*)addr + new_size, old_size - new_size);
814 static int zend_mm_chunk_extend(zend_mm_heap *heap, void *addr, size_t old_size, size_t new_size) argument
819 return heap->storage->handlers.chunk_extend(heap->storage, addr, old_size, new_size);
827 void *ptr = mremap(addr, old_size, new_size, 0);
835 return (zend_mm_mmap_fixed((char*)addr + old_size, new_size - old_size) != NULL);
1487 size_t new_size; local
1506 new_size = ZEND_MM_ALIGNED_SIZE_EX(size, MAX(REAL_PAGE_SIZE, ZEND_MM_CHUNK_SIZE));
1508 new_size = ZEND_MM_ALIGNED_SIZE_EX(size, REAL_PAGE_SIZE);
1510 if (new_size == old_size) {
1512 …zend_mm_change_huge_block_size(heap, ptr, new_size, real_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LI…
1514 …zend_mm_change_huge_block_size(heap, ptr, new_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_REL…
1517 } else if (new_size < old_size) {
1519 if (zend_mm_chunk_truncate(heap, ptr, old_size, new_size)) {
1521 heap->real_size -= old_size - new_size;
1524 heap->size -= old_size - new_size;
1527 …zend_mm_change_huge_block_size(heap, ptr, new_size, real_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LI…
1529 …zend_mm_change_huge_block_size(heap, ptr, new_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_REL…
1535 if (UNEXPECTED(new_size - old_size > heap->limit - heap->real_size)) {
1536 if (zend_mm_gc(heap) && new_size - old_size <= heap->limit - heap->real_size) {
1549 if (zend_mm_chunk_extend(heap, ptr, old_size, new_size)) {
1551 heap->real_size += new_size - old_size;
1555 heap->size += new_size - old_size;
1559 …zend_mm_change_huge_block_size(heap, ptr, new_size, real_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LI…
1561 …zend_mm_change_huge_block_size(heap, ptr, new_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_REL…
1575 size_t new_size; local
1653 new_size = ZEND_MM_ALIGNED_SIZE_EX(size, ZEND_MM_PAGE_SIZE);
1654 if (new_size == old_size) {
1664 } else if (new_size < old_size) {
1666 int new_pages_count = (int)(new_size / ZEND_MM_PAGE_SIZE);
1667 int rest_pages_count = (int)((old_size - new_size) / ZEND_MM_PAGE_SIZE);
1685 int new_pages_count = (int)(new_size / ZEND_MM_PAGE_SIZE);
1693 size_t size = heap->size + (new_size - old_size);
1819 size_t new_size = ZEND_MM_ALIGNED_SIZE_EX(size, alignment); local
1822 if (UNEXPECTED(new_size < size)) {
1827 if (UNEXPECTED(new_size > heap->limit - heap->real_size)) {
1828 if (zend_mm_gc(heap) && new_size <= heap->limit - heap->real_size) {
1840 ptr = zend_mm_chunk_alloc(heap, new_size, ZEND_MM_CHUNK_SIZE);
1844 (ptr = zend_mm_chunk_alloc(heap, new_size, ZEND_MM_CHUNK_SIZE)) != NULL) {
1858 …zend_mm_add_huge_block(heap, ptr, new_size, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY…
1860 zend_mm_add_huge_block(heap, ptr, new_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
1864 size_t size = heap->real_size + new_size;
1870 size_t size = heap->size + new_size;
1876 heap->real_size += new_size;
2854 static void *tracked_realloc(void *ptr, size_t new_size) { argument
2863 if (new_size > old_size) {
2864 tracked_check_limit(heap, new_size - old_size);
2872 ptr = __zend_realloc(ptr, new_size);
2873 tracked_add(heap, ptr, new_size);
2874 heap->size += new_size - old_size;