Lines Matching refs:heap
439 dump_heap (heap_info *heap) in dump_heap() argument
444 fprintf (stderr, "Heap %p, size %10lx:\n", heap, (long) heap->size); in dump_heap()
445 ptr = (heap->ar_ptr != (mstate) (heap + 1)) ? in dump_heap()
446 (char *) (heap + 1) : (char *) (heap + 1) + sizeof (struct malloc_state); in dump_heap()
452 if (p == top (heap->ar_ptr)) in dump_heap()
642 heap_trim (heap_info *heap, size_t pad) in heap_trim() argument
644 mstate ar_ptr = heap->ar_ptr; in heap_trim()
651 while (top_chunk == chunk_at_offset (heap, sizeof (*heap))) in heap_trim()
653 prev_heap = heap->prev; in heap_trim()
667 + heap->pagesize) in heap_trim()
669 ar_ptr->system_mem -= heap->size; in heap_trim()
670 LIBC_PROBE (memory_heap_free, 2, heap, heap->size); in heap_trim()
671 if ((char *) heap + max_size == aligned_heap_area) in heap_trim()
673 __munmap (heap, max_size); in heap_trim()
674 heap = prev_heap; in heap_trim()
680 assert (((unsigned long) ((char *) p + new_size) & (heap->pagesize - 1)) in heap_trim()
682 assert (((char *) p + new_size) == ((char *) heap + heap->size)); in heap_trim()
701 extra = ALIGN_DOWN(top_area - pad, heap->pagesize); in heap_trim()
706 if (shrink_heap (heap, extra) != 0) in heap_trim()