Lines Matching refs:p

2274 #define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))  argument
2312 #define cinuse(p) ((p)->head & CINUSE_BIT) argument
2313 #define pinuse(p) ((p)->head & PINUSE_BIT) argument
2314 #define flag4inuse(p) ((p)->head & FLAG4_BIT) argument
2315 #define is_inuse(p) (((p)->head & INUSE_BITS) != PINUSE_BIT) argument
2316 #define is_mmapped(p) (((p)->head & INUSE_BITS) == 0) argument
2318 #define chunksize(p) ((p)->head & ~(FLAG_BITS)) argument
2320 #define clear_pinuse(p) ((p)->head &= ~PINUSE_BIT) argument
2321 #define set_flag4(p) ((p)->head |= FLAG4_BIT) argument
2322 #define clear_flag4(p) ((p)->head &= ~FLAG4_BIT) argument
2325 #define chunk_plus_offset(p, s) ((mchunkptr)(((char*)(p)) + (s))) argument
2326 #define chunk_minus_offset(p, s) ((mchunkptr)(((char*)(p)) - (s))) argument
2329 #define next_chunk(p) ((mchunkptr)( ((char*)(p)) + ((p)->head & ~FLAG_BITS))) argument
2330 #define prev_chunk(p) ((mchunkptr)( ((char*)(p)) - ((p)->prev_foot) )) argument
2333 #define next_pinuse(p) ((next_chunk(p)->head) & PINUSE_BIT) argument
2336 #define get_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot) argument
2337 #define set_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot = (s)) argument
2340 #define set_size_and_pinuse_of_free_chunk(p, s)\ argument
2341 ((p)->head = (s|PINUSE_BIT), set_foot(p, s))
2344 #define set_free_with_pinuse(p, s, n)\ argument
2345 (clear_pinuse(n), set_size_and_pinuse_of_free_chunk(p, s))
2348 #define overhead_for(p)\ argument
2349 (is_mmapped(p)? MMAP_CHUNK_OVERHEAD : CHUNK_OVERHEAD)
2353 #define calloc_must_clear(p) (!is_mmapped(p)) argument
2355 #define calloc_must_clear(p) (1) argument
2830 #define USAGE_ERROR_ACTION(m, p) argument
2839 #define USAGE_ERROR_ACTION(m,p) ABORT argument
2864 static void do_check_any_chunk(mstate m, mchunkptr p);
2865 static void do_check_top_chunk(mstate m, mchunkptr p);
2866 static void do_check_mmapped_chunk(mstate m, mchunkptr p);
2867 static void do_check_inuse_chunk(mstate m, mchunkptr p);
2868 static void do_check_free_chunk(mstate m, mchunkptr p);
3067 #define ok_next(p, n) ((char*)(p) < (char*)(n)) argument
3069 #define ok_inuse(p) is_inuse(p) argument
3071 #define ok_pinuse(p) pinuse(p) argument
3076 #define ok_inuse(p) (1) argument
3077 #define ok_pinuse(p) (1) argument
3102 #define mark_inuse_foot(M,p,s) argument
3107 #define set_inuse(M,p,s)\ argument
3108 ((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\
3109 ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT)
3112 #define set_inuse_and_pinuse(M,p,s)\ argument
3113 ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\
3114 ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT)
3117 #define set_size_and_pinuse_of_inuse_chunk(M, p, s)\ argument
3118 ((p)->head = (s|PINUSE_BIT|CINUSE_BIT))
3123 #define mark_inuse_foot(M,p,s)\ argument
3124 (((mchunkptr)((char*)(p) + (s)))->prev_foot = ((size_t)(M) ^ mparams.magic))
3126 #define get_mstate_for(p)\ argument
3127 ((mstate)(((mchunkptr)((char*)(p) +\
3128 (chunksize(p))))->prev_foot ^ mparams.magic))
3130 #define set_inuse(M,p,s)\ argument
3131 ((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\
3132 (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT), \
3133 mark_inuse_foot(M,p,s))
3135 #define set_inuse_and_pinuse(M,p,s)\ argument
3136 ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\
3137 (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT),\
3138 mark_inuse_foot(M,p,s))
3140 #define set_size_and_pinuse_of_inuse_chunk(M, p, s)\ argument
3141 ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\
3142 mark_inuse_foot(M, p, s))
3272 static void do_check_any_chunk(mstate m, mchunkptr p) { in do_check_any_chunk() argument
3273 assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); in do_check_any_chunk()
3274 assert(ok_address(m, p)); in do_check_any_chunk()
3278 static void do_check_top_chunk(mstate m, mchunkptr p) { in do_check_top_chunk() argument
3279 msegmentptr sp = segment_holding(m, (char*)p); in do_check_top_chunk()
3280 size_t sz = p->head & ~INUSE_BITS; /* third-lowest bit can be set! */ in do_check_top_chunk()
3282 assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); in do_check_top_chunk()
3283 assert(ok_address(m, p)); in do_check_top_chunk()
3286 assert(sz == ((sp->base + sp->size) - (char*)p) - TOP_FOOT_SIZE); in do_check_top_chunk()
3287 assert(pinuse(p)); in do_check_top_chunk()
3288 assert(!pinuse(chunk_plus_offset(p, sz))); in do_check_top_chunk()
3292 static void do_check_mmapped_chunk(mstate m, mchunkptr p) { in do_check_mmapped_chunk() argument
3293 size_t sz = chunksize(p); in do_check_mmapped_chunk()
3294 size_t len = (sz + (p->prev_foot) + MMAP_FOOT_PAD); in do_check_mmapped_chunk()
3295 assert(is_mmapped(p)); in do_check_mmapped_chunk()
3297 assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); in do_check_mmapped_chunk()
3298 assert(ok_address(m, p)); in do_check_mmapped_chunk()
3301 assert(chunk_plus_offset(p, sz)->head == FENCEPOST_HEAD); in do_check_mmapped_chunk()
3302 assert(chunk_plus_offset(p, sz+SIZE_T_SIZE)->head == 0); in do_check_mmapped_chunk()
3306 static void do_check_inuse_chunk(mstate m, mchunkptr p) { in do_check_inuse_chunk() argument
3307 do_check_any_chunk(m, p); in do_check_inuse_chunk()
3308 assert(is_inuse(p)); in do_check_inuse_chunk()
3309 assert(next_pinuse(p)); in do_check_inuse_chunk()
3311 assert(is_mmapped(p) || pinuse(p) || next_chunk(prev_chunk(p)) == p); in do_check_inuse_chunk()
3312 if (is_mmapped(p)) in do_check_inuse_chunk()
3313 do_check_mmapped_chunk(m, p); in do_check_inuse_chunk()
3317 static void do_check_free_chunk(mstate m, mchunkptr p) { in do_check_free_chunk() argument
3318 size_t sz = chunksize(p); in do_check_free_chunk()
3319 mchunkptr next = chunk_plus_offset(p, sz); in do_check_free_chunk()
3320 do_check_any_chunk(m, p); in do_check_free_chunk()
3321 assert(!is_inuse(p)); in do_check_free_chunk()
3322 assert(!next_pinuse(p)); in do_check_free_chunk()
3323 assert (!is_mmapped(p)); in do_check_free_chunk()
3324 if (p != m->dv && p != m->top) { in do_check_free_chunk()
3327 assert(is_aligned(chunk2mem(p))); in do_check_free_chunk()
3329 assert(pinuse(p)); in do_check_free_chunk()
3331 assert(p->fd->bk == p); in do_check_free_chunk()
3332 assert(p->bk->fd == p); in do_check_free_chunk()
3342 mchunkptr p = mem2chunk(mem); in do_check_malloced_chunk() local
3343 size_t sz = p->head & ~INUSE_BITS; in do_check_malloced_chunk()
3344 do_check_inuse_chunk(m, p); in do_check_malloced_chunk()
3349 assert(is_mmapped(p) || sz < (s + MIN_CHUNK_SIZE)); in do_check_malloced_chunk()
3418 mchunkptr p = b->bk; in do_check_smallbin() local
3420 if (p == b) in do_check_smallbin()
3423 for (; p != b; p = p->bk) { in do_check_smallbin()
3424 size_t size = chunksize(p); in do_check_smallbin()
3427 do_check_free_chunk(m, p); in do_check_smallbin()
3430 assert(p->bk == b || chunksize(p->bk) == chunksize(p)); in do_check_smallbin()
3432 q = next_chunk(p); in do_check_smallbin()
3446 mchunkptr p = b; in bin_find() local
3448 if (p == x) in bin_find()
3450 } while ((p = p->fd) != b); in bin_find()
3891 mchunkptr p = (mchunkptr)(mm + offset); in mmap_alloc() local
3892 p->prev_foot = offset; in mmap_alloc()
3893 p->head = psize; in mmap_alloc()
3894 mark_inuse_foot(m, p, psize); in mmap_alloc()
3895 chunk_plus_offset(p, psize)->head = FENCEPOST_HEAD; in mmap_alloc()
3896 chunk_plus_offset(p, psize+SIZE_T_SIZE)->head = 0; in mmap_alloc()
3902 assert(is_aligned(chunk2mem(p))); in mmap_alloc()
3903 check_mmapped_chunk(m, p); in mmap_alloc()
3904 return chunk2mem(p); in mmap_alloc()
3949 static void init_top(mstate m, mchunkptr p, size_t psize) { in init_top() argument
3951 size_t offset = align_offset(chunk2mem(p)); in init_top()
3952 p = (mchunkptr)((char*)p + offset); in init_top()
3955 m->top = p; in init_top()
3957 p->head = psize | PINUSE_BIT; in init_top()
3959 chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE; in init_top()
3995 mchunkptr p = align_as_chunk(newbase); in prepend_alloc() local
3997 size_t psize = (char*)oldfirst - (char*)p; in prepend_alloc()
3998 mchunkptr q = chunk_plus_offset(p, nb); in prepend_alloc()
4000 set_size_and_pinuse_of_inuse_chunk(m, p, nb); in prepend_alloc()
4030 check_malloced_chunk(m, chunk2mem(p), nb); in prepend_alloc()
4031 return chunk2mem(p); in prepend_alloc()
4048 mchunkptr p = tnext; in add_segment() local
4065 mchunkptr nextp = chunk_plus_offset(p, SIZE_T_SIZE); in add_segment()
4066 p->head = FENCEPOST_HEAD; in add_segment()
4069 p = nextp; in add_segment()
4284 mchunkptr p = m->top; in sys_alloc() local
4285 mchunkptr r = m->top = chunk_plus_offset(p, nb); in sys_alloc()
4287 set_size_and_pinuse_of_inuse_chunk(m, p, nb); in sys_alloc()
4289 check_malloced_chunk(m, chunk2mem(p), nb); in sys_alloc()
4290 return chunk2mem(p); in sys_alloc()
4312 mchunkptr p = align_as_chunk(base); in release_unused_segments() local
4313 size_t psize = chunksize(p); in release_unused_segments()
4315 if (!is_inuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) { in release_unused_segments()
4316 tchunkptr tp = (tchunkptr)p; in release_unused_segments()
4318 if (p == m->dv) { in release_unused_segments()
4416 static void dispose_chunk(mstate m, mchunkptr p, size_t psize) { in dispose_chunk() argument
4417 mchunkptr next = chunk_plus_offset(p, psize); in dispose_chunk()
4418 if (!pinuse(p)) { in dispose_chunk()
4420 size_t prevsize = p->prev_foot; in dispose_chunk()
4421 if (is_mmapped(p)) { in dispose_chunk()
4423 if (CALL_MUNMAP((char*)p - prevsize, psize) == 0) in dispose_chunk()
4427 prev = chunk_minus_offset(p, prevsize); in dispose_chunk()
4429 p = prev; in dispose_chunk()
4431 if (p != m->dv) { in dispose_chunk()
4432 unlink_chunk(m, p, prevsize); in dispose_chunk()
4436 set_free_with_pinuse(p, psize, next); in dispose_chunk()
4449 m->top = p; in dispose_chunk()
4450 p->head = tsize | PINUSE_BIT; in dispose_chunk()
4451 if (p == m->dv) { in dispose_chunk()
4459 m->dv = p; in dispose_chunk()
4460 set_size_and_pinuse_of_free_chunk(p, dsize); in dispose_chunk()
4467 set_size_and_pinuse_of_free_chunk(p, psize); in dispose_chunk()
4468 if (p == m->dv) { in dispose_chunk()
4475 set_free_with_pinuse(p, psize, next); in dispose_chunk()
4477 insert_chunk(m, p, psize); in dispose_chunk()
4636 mchunkptr b, p; in dlmalloc() local
4639 p = b->fd; in dlmalloc()
4640 assert(chunksize(p) == small_index2size(idx)); in dlmalloc()
4641 unlink_first_small_chunk(gm, b, p, idx); in dlmalloc()
4642 set_inuse_and_pinuse(gm, p, small_index2size(idx)); in dlmalloc()
4643 mem = chunk2mem(p); in dlmalloc()
4650 mchunkptr b, p, r; in dlmalloc() local
4657 p = b->fd; in dlmalloc()
4658 assert(chunksize(p) == small_index2size(i)); in dlmalloc()
4659 unlink_first_small_chunk(gm, b, p, i); in dlmalloc()
4663 set_inuse_and_pinuse(gm, p, small_index2size(i)); in dlmalloc()
4665 set_size_and_pinuse_of_inuse_chunk(gm, p, nb); in dlmalloc()
4666 r = chunk_plus_offset(p, nb); in dlmalloc()
4670 mem = chunk2mem(p); in dlmalloc()
4693 mchunkptr p = gm->dv; in dlmalloc() local
4695 mchunkptr r = gm->dv = chunk_plus_offset(p, nb); in dlmalloc()
4698 set_size_and_pinuse_of_inuse_chunk(gm, p, nb); in dlmalloc()
4704 set_inuse_and_pinuse(gm, p, dvs); in dlmalloc()
4706 mem = chunk2mem(p); in dlmalloc()
4713 mchunkptr p = gm->top; in dlmalloc() local
4714 mchunkptr r = gm->top = chunk_plus_offset(p, nb); in dlmalloc()
4716 set_size_and_pinuse_of_inuse_chunk(gm, p, nb); in dlmalloc()
4717 mem = chunk2mem(p); in dlmalloc()
4743 mchunkptr p = mem2chunk(mem); in dlfree() local
4745 mstate fm = get_mstate_for(p); in dlfree()
4747 USAGE_ERROR_ACTION(fm, p); in dlfree()
4754 check_inuse_chunk(fm, p); in dlfree()
4755 if (RTCHECK(ok_address(fm, p) && ok_inuse(p))) { in dlfree()
4756 size_t psize = chunksize(p); in dlfree()
4757 mchunkptr next = chunk_plus_offset(p, psize); in dlfree()
4758 if (!pinuse(p)) { in dlfree()
4759 size_t prevsize = p->prev_foot; in dlfree()
4760 if (is_mmapped(p)) { in dlfree()
4762 if (CALL_MUNMAP((char*)p - prevsize, psize) == 0) in dlfree()
4767 mchunkptr prev = chunk_minus_offset(p, prevsize); in dlfree()
4769 p = prev; in dlfree()
4771 if (p != fm->dv) { in dlfree()
4772 unlink_chunk(fm, p, prevsize); in dlfree()
4776 set_free_with_pinuse(p, psize, next); in dlfree()
4785 if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) { in dlfree()
4789 fm->top = p; in dlfree()
4790 p->head = tsize | PINUSE_BIT; in dlfree()
4791 if (p == fm->dv) { in dlfree()
4801 fm->dv = p; in dlfree()
4802 set_size_and_pinuse_of_free_chunk(p, dsize); in dlfree()
4809 set_size_and_pinuse_of_free_chunk(p, psize); in dlfree()
4810 if (p == fm->dv) { in dlfree()
4817 set_free_with_pinuse(p, psize, next); in dlfree()
4820 insert_small_chunk(fm, p, psize); in dlfree()
4821 check_free_chunk(fm, p); in dlfree()
4824 tchunkptr tp = (tchunkptr)p; in dlfree()
4826 check_free_chunk(fm, p); in dlfree()
4834 USAGE_ERROR_ACTION(fm, p); in dlfree()
4864 static mchunkptr try_realloc_chunk(mstate m, mchunkptr p, size_t nb, in try_realloc_chunk() argument
4867 size_t oldsize = chunksize(p); in try_realloc_chunk()
4868 mchunkptr next = chunk_plus_offset(p, oldsize); in try_realloc_chunk()
4869 if (RTCHECK(ok_address(m, p) && ok_inuse(p) && in try_realloc_chunk()
4870 ok_next(p, next) && ok_pinuse(next))) { in try_realloc_chunk()
4871 if (is_mmapped(p)) { in try_realloc_chunk()
4872 newp = mmap_resize(m, p, nb, can_move); in try_realloc_chunk()
4877 mchunkptr r = chunk_plus_offset(p, nb); in try_realloc_chunk()
4878 set_inuse(m, p, nb); in try_realloc_chunk()
4882 newp = p; in try_realloc_chunk()
4888 mchunkptr newtop = chunk_plus_offset(p, nb); in try_realloc_chunk()
4889 set_inuse(m, p, nb); in try_realloc_chunk()
4893 newp = p; in try_realloc_chunk()
4901 mchunkptr r = chunk_plus_offset(p, nb); in try_realloc_chunk()
4903 set_inuse(m, p, nb); in try_realloc_chunk()
4911 set_inuse(m, p, newsize); in try_realloc_chunk()
4915 newp = p; in try_realloc_chunk()
4925 set_inuse(m, p, newsize); in try_realloc_chunk()
4928 mchunkptr r = chunk_plus_offset(p, nb); in try_realloc_chunk()
4929 set_inuse(m, p, nb); in try_realloc_chunk()
4933 newp = p; in try_realloc_chunk()
4938 USAGE_ERROR_ACTION(m, chunk2mem(p)); in try_realloc_chunk()
4962 mchunkptr p = mem2chunk(mem); in internal_memalign() local
4977 char* pos = ((size_t)(br - (char*)(p)) >= MIN_CHUNK_SIZE)? in internal_memalign()
4980 size_t leadsize = pos - (char*)(p); in internal_memalign()
4981 size_t newsize = chunksize(p) - leadsize; in internal_memalign()
4983 if (is_mmapped(p)) { /* For mmapped chunks, just adjust offset */ in internal_memalign()
4984 newp->prev_foot = p->prev_foot + leadsize; in internal_memalign()
4989 set_inuse(m, p, leadsize); in internal_memalign()
4990 dispose_chunk(m, p, leadsize); in internal_memalign()
4992 p = newp; in internal_memalign()
4996 if (!is_mmapped(p)) { in internal_memalign()
4997 size_t size = chunksize(p); in internal_memalign()
5000 mchunkptr remainder = chunk_plus_offset(p, nb); in internal_memalign()
5001 set_inuse(m, p, nb); in internal_memalign()
5007 mem = chunk2mem(p); in internal_memalign()
5008 assert (chunksize(p) >= nb); in internal_memalign()
5010 check_inuse_chunk(m, p); in internal_memalign()
5034 mchunkptr p; /* corresponding chunk */ in ialloc() local
5086 p = mem2chunk(mem); in ialloc()
5087 remainder_size = chunksize(p); in ialloc()
5089 assert(!is_mmapped(p)); in ialloc()
5098 array_chunk = chunk_plus_offset(p, contents_size); in ialloc()
5107 marray[i] = chunk2mem(p); in ialloc()
5114 set_size_and_pinuse_of_inuse_chunk(m, p, size); in ialloc()
5115 p = chunk_plus_offset(p, size); in ialloc()
5118 set_size_and_pinuse_of_inuse_chunk(m, p, remainder_size); in ialloc()
5158 mchunkptr p = mem2chunk(mem); in internal_bulk_free() local
5159 size_t psize = chunksize(p); in internal_bulk_free()
5161 if (get_mstate_for(p) != m) { in internal_bulk_free()
5166 check_inuse_chunk(m, p); in internal_bulk_free()
5168 if (RTCHECK(ok_address(m, p) && ok_inuse(p))) { in internal_bulk_free()
5170 mchunkptr next = next_chunk(p); in internal_bulk_free()
5173 set_inuse(m, p, newsize); in internal_bulk_free()
5174 *b = chunk2mem(p); in internal_bulk_free()
5177 dispose_chunk(m, p, psize); in internal_bulk_free()
5439 mchunkptr p = mem2chunk(mem); in dlmalloc_usable_size() local
5440 if (is_inuse(p)) in dlmalloc_usable_size()
5441 return chunksize(p) - overhead_for(p); in dlmalloc_usable_size()
5570 mchunkptr b, p; in mspace_malloc() local
5573 p = b->fd; in mspace_malloc()
5574 assert(chunksize(p) == small_index2size(idx)); in mspace_malloc()
5575 unlink_first_small_chunk(ms, b, p, idx); in mspace_malloc()
5576 set_inuse_and_pinuse(ms, p, small_index2size(idx)); in mspace_malloc()
5577 mem = chunk2mem(p); in mspace_malloc()
5584 mchunkptr b, p, r; in mspace_malloc() local
5591 p = b->fd; in mspace_malloc()
5592 assert(chunksize(p) == small_index2size(i)); in mspace_malloc()
5593 unlink_first_small_chunk(ms, b, p, i); in mspace_malloc()
5597 set_inuse_and_pinuse(ms, p, small_index2size(i)); in mspace_malloc()
5599 set_size_and_pinuse_of_inuse_chunk(ms, p, nb); in mspace_malloc()
5600 r = chunk_plus_offset(p, nb); in mspace_malloc()
5604 mem = chunk2mem(p); in mspace_malloc()
5627 mchunkptr p = ms->dv; in mspace_malloc() local
5629 mchunkptr r = ms->dv = chunk_plus_offset(p, nb); in mspace_malloc()
5632 set_size_and_pinuse_of_inuse_chunk(ms, p, nb); in mspace_malloc()
5638 set_inuse_and_pinuse(ms, p, dvs); in mspace_malloc()
5640 mem = chunk2mem(p); in mspace_malloc()
5647 mchunkptr p = ms->top; in mspace_malloc() local
5648 mchunkptr r = ms->top = chunk_plus_offset(p, nb); in mspace_malloc()
5650 set_size_and_pinuse_of_inuse_chunk(ms, p, nb); in mspace_malloc()
5651 mem = chunk2mem(p); in mspace_malloc()
5669 mchunkptr p = mem2chunk(mem); in mspace_free() local
5671 mstate fm = get_mstate_for(p); in mspace_free()
5677 USAGE_ERROR_ACTION(fm, p); in mspace_free()
5681 check_inuse_chunk(fm, p); in mspace_free()
5682 if (RTCHECK(ok_address(fm, p) && ok_inuse(p))) { in mspace_free()
5683 size_t psize = chunksize(p); in mspace_free()
5684 mchunkptr next = chunk_plus_offset(p, psize); in mspace_free()
5685 if (!pinuse(p)) { in mspace_free()
5686 size_t prevsize = p->prev_foot; in mspace_free()
5687 if (is_mmapped(p)) { in mspace_free()
5689 if (CALL_MUNMAP((char*)p - prevsize, psize) == 0) in mspace_free()
5694 mchunkptr prev = chunk_minus_offset(p, prevsize); in mspace_free()
5696 p = prev; in mspace_free()
5698 if (p != fm->dv) { in mspace_free()
5699 unlink_chunk(fm, p, prevsize); in mspace_free()
5703 set_free_with_pinuse(p, psize, next); in mspace_free()
5712 if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) { in mspace_free()
5716 fm->top = p; in mspace_free()
5717 p->head = tsize | PINUSE_BIT; in mspace_free()
5718 if (p == fm->dv) { in mspace_free()
5728 fm->dv = p; in mspace_free()
5729 set_size_and_pinuse_of_free_chunk(p, dsize); in mspace_free()
5736 set_size_and_pinuse_of_free_chunk(p, psize); in mspace_free()
5737 if (p == fm->dv) { in mspace_free()
5744 set_free_with_pinuse(p, psize, next); in mspace_free()
5747 insert_small_chunk(fm, p, psize); in mspace_free()
5748 check_free_chunk(fm, p); in mspace_free()
5751 tchunkptr tp = (tchunkptr)p; in mspace_free()
5753 check_free_chunk(fm, p); in mspace_free()
5761 USAGE_ERROR_ACTION(fm, p); in mspace_free()
6015 mchunkptr p = mem2chunk(mem); in mspace_usable_size() local
6016 if (is_inuse(p)) in mspace_usable_size()
6017 return chunksize(p) - overhead_for(p); in mspace_usable_size()