Lines Matching refs:h
487 heap_info *h; in alloc_new_heap() local
553 h = (heap_info *) p2; in alloc_new_heap()
554 h->size = size; in alloc_new_heap()
555 h->mprotect_size = size; in alloc_new_heap()
556 h->pagesize = pagesize; in alloc_new_heap()
557 LIBC_PROBE (memory_heap_new, 2, h, h->size); in alloc_new_heap()
558 return h; in alloc_new_heap()
570 heap_info *h = alloc_new_heap (size, top_pad, mp_.hp_pagesize, in new_heap() local
572 if (h != NULL) in new_heap()
573 return h; in new_heap()
583 grow_heap (heap_info *h, long diff) in grow_heap() argument
585 size_t pagesize = h->pagesize; in grow_heap()
590 new_size = (long) h->size + diff; in grow_heap()
594 if ((unsigned long) new_size > h->mprotect_size) in grow_heap()
596 if (__mprotect ((char *) h + h->mprotect_size, in grow_heap()
597 (unsigned long) new_size - h->mprotect_size, in grow_heap()
601 h->mprotect_size = new_size; in grow_heap()
604 h->size = new_size; in grow_heap()
605 LIBC_PROBE (memory_heap_more, 2, h, h->size); in grow_heap()
612 shrink_heap (heap_info *h, long diff) in shrink_heap() argument
616 new_size = (long) h->size - diff; in shrink_heap()
617 if (new_size < (long) sizeof (*h)) in shrink_heap()
624 if ((char *) MMAP ((char *) h + new_size, diff, PROT_NONE, in shrink_heap()
628 h->mprotect_size = new_size; in shrink_heap()
631 __madvise ((char *) h + new_size, diff, MADV_DONTNEED); in shrink_heap()
634 h->size = new_size; in shrink_heap()
635 LIBC_PROBE (memory_heap_less, 2, h, h->size); in shrink_heap()
740 heap_info *h; in _int_new_arena() local
744 h = new_heap (size + (sizeof (*h) + sizeof (*a) + MALLOC_ALIGNMENT), in _int_new_arena()
746 if (!h) in _int_new_arena()
751 h = new_heap (sizeof (*h) + sizeof (*a) + MALLOC_ALIGNMENT, mp_.top_pad); in _int_new_arena()
752 if (!h) in _int_new_arena()
755 a = h->ar_ptr = (mstate) (h + 1); in _int_new_arena()
759 a->system_mem = a->max_system_mem = h->size; in _int_new_arena()
767 set_head (top (a), (((char *) h + h->size) - ptr) | PREV_INUSE); in _int_new_arena()