Lines Matching refs:new_size
778 static int zend_mm_chunk_truncate(zend_mm_heap *heap, void *addr, size_t old_size, size_t new_size) argument
783 return heap->storage->handlers.chunk_truncate(heap->storage, addr, old_size, new_size);
790 zend_mm_munmap((char*)addr + new_size, old_size - new_size);
797 static int zend_mm_chunk_extend(zend_mm_heap *heap, void *addr, size_t old_size, size_t new_size) argument
802 return heap->storage->handlers.chunk_extend(heap->storage, addr, old_size, new_size);
809 return (zend_mm_mmap_fixed((char*)addr + old_size, new_size - old_size) != NULL);
1432 size_t new_size; local
1458 new_size = ZEND_MM_ALIGNED_SIZE_EX(size, MAX(REAL_PAGE_SIZE, ZEND_MM_CHUNK_SIZE));
1460 new_size = ZEND_MM_ALIGNED_SIZE_EX(size, REAL_PAGE_SIZE);
1462 if (new_size == old_size) {
1464 …zend_mm_change_huge_block_size(heap, ptr, new_size, real_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LI…
1466 …zend_mm_change_huge_block_size(heap, ptr, new_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_REL…
1469 } else if (new_size < old_size) {
1471 if (zend_mm_chunk_truncate(heap, ptr, old_size, new_size)) {
1473 heap->real_size -= old_size - new_size;
1476 heap->size -= old_size - new_size;
1479 …zend_mm_change_huge_block_size(heap, ptr, new_size, real_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LI…
1481 …zend_mm_change_huge_block_size(heap, ptr, new_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_REL…
1487 if (UNEXPECTED(new_size - old_size > heap->limit - heap->real_size)) {
1488 if (zend_mm_gc(heap) && new_size - old_size <= heap->limit - heap->real_size) {
1501 if (zend_mm_chunk_extend(heap, ptr, old_size, new_size)) {
1503 heap->real_size += new_size - old_size;
1507 heap->size += new_size - old_size;
1511 …zend_mm_change_huge_block_size(heap, ptr, new_size, real_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LI…
1513 …zend_mm_change_huge_block_size(heap, ptr, new_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_REL…
1551 new_size = ZEND_MM_ALIGNED_SIZE_EX(size, ZEND_MM_PAGE_SIZE);
1552 if (new_size == old_size) {
1562 } else if (new_size < old_size) {
1564 int new_pages_count = (int)(new_size / ZEND_MM_PAGE_SIZE);
1565 int rest_pages_count = (int)((old_size - new_size) / ZEND_MM_PAGE_SIZE);
1583 int new_pages_count = (int)(new_size / ZEND_MM_PAGE_SIZE);
1591 size_t size = heap->size + (new_size - old_size);
1730 size_t new_size = ZEND_MM_ALIGNED_SIZE_EX(size, alignment); local
1733 if (UNEXPECTED(new_size < size)) {
1738 if (UNEXPECTED(new_size > heap->limit - heap->real_size)) {
1739 if (zend_mm_gc(heap) && new_size <= heap->limit - heap->real_size) {
1751 ptr = zend_mm_chunk_alloc(heap, new_size, ZEND_MM_CHUNK_SIZE);
1755 (ptr = zend_mm_chunk_alloc(heap, new_size, ZEND_MM_CHUNK_SIZE)) != NULL) {
1769 …zend_mm_add_huge_block(heap, ptr, new_size, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY…
1771 zend_mm_add_huge_block(heap, ptr, new_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
1775 size_t size = heap->real_size + new_size;
1781 size_t size = heap->size + new_size;
1787 heap->real_size += new_size;