Lines Matching refs:size

79   size_t size;   /* Current size in bytes. */  member
138 #define arena_get(ptr, size) do { \ argument
140 arena_lock (ptr, size); \
143 #define arena_lock(ptr, size) do { \ argument
147 ptr = arena_get2 ((size), NULL); \
444 fprintf (stderr, "Heap %p, size %10lx:\n", heap, (long) heap->size); in dump_heap()
482 alloc_new_heap (size_t size, size_t top_pad, size_t pagesize, in alloc_new_heap() argument
491 if (size + top_pad < min_size) in alloc_new_heap()
492 size = min_size; in alloc_new_heap()
493 else if (size + top_pad <= max_size) in alloc_new_heap()
494 size += top_pad; in alloc_new_heap()
495 else if (size > max_size) in alloc_new_heap()
498 size = max_size; in alloc_new_heap()
499 size = ALIGN_UP (size, pagesize); in alloc_new_heap()
545 if (__mprotect (p2, size, mtag_mmap_flags | PROT_READ | PROT_WRITE) != 0) in alloc_new_heap()
551 madvise_thp (p2, size); in alloc_new_heap()
554 h->size = size; in alloc_new_heap()
555 h->mprotect_size = size; in alloc_new_heap()
557 LIBC_PROBE (memory_heap_new, 2, h, h->size); in alloc_new_heap()
562 new_heap (size_t size, size_t top_pad) in new_heap() argument
570 heap_info *h = alloc_new_heap (size, top_pad, mp_.hp_pagesize, in new_heap()
576 return alloc_new_heap (size, top_pad, GLRO (dl_pagesize), MAP_NORESERVE); in new_heap()
590 new_size = (long) h->size + diff; in grow_heap()
604 h->size = new_size; in grow_heap()
605 LIBC_PROBE (memory_heap_more, 2, h, h->size); in grow_heap()
616 new_size = (long) h->size - diff; in shrink_heap()
634 h->size = new_size; in shrink_heap()
635 LIBC_PROBE (memory_heap_less, 2, h, h->size); in shrink_heap()
654 prev_size = prev_heap->size - (MINSIZE - 2 * SIZE_SZ); in heap_trim()
666 if (new_size + (max_size - prev_heap->size) < pad + MINSIZE 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()
682 assert (((char *) p + new_size) == ((char *) heap + heap->size)); in heap_trim()
737 _int_new_arena (size_t size) in _int_new_arena() argument
744 h = new_heap (size + (sizeof (*h) + sizeof (*a) + MALLOC_ALIGNMENT), 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()
769 LIBC_PROBE (memory_arena_new, 2, a, size); in _int_new_arena()
924 arena_get2 (size_t size, mstate avoid_arena) in arena_get2() argument
963 a = _int_new_arena (size); in arena_get2()