Lines Matching refs:mchunkptr
1662 typedef struct malloc_chunk* mchunkptr; typedef
1689 #define mem2chunk(mem) ((mchunkptr)((char*)(mem) - TWO_SIZE_T_SIZES))
1691 #define align_as_chunk(A) (mchunkptr)((A) + align_offset(chunk2mem(A)))
1732 #define chunk_plus_offset(p, s) ((mchunkptr)(((char*)(p)) + (s)))
1733 #define chunk_minus_offset(p, s) ((mchunkptr)(((char*)(p)) - (s)))
1736 #define next_chunk(p) ((mchunkptr)( ((char*)(p)) + ((p)->head & ~INUSE_BITS)))
1737 #define prev_chunk(p) ((mchunkptr)( ((char*)(p)) - ((p)->prev_foot) ))
1743 #define get_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot)
1744 #define set_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot = (s))
2075 mchunkptr dv;
2076 mchunkptr top;
2079 mchunkptr smallbins[(NSMALLBINS+1)*2];
2268 static void do_check_any_chunk(mstate m, mchunkptr p);
2269 static void do_check_top_chunk(mstate m, mchunkptr p);
2270 static void do_check_mmapped_chunk(mstate m, mchunkptr p);
2271 static void do_check_inuse_chunk(mstate m, mchunkptr p);
2272 static void do_check_free_chunk(mstate m, mchunkptr p);
2278 static int bin_find(mstate m, mchunkptr x);
2469 ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT)
2474 ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT)
2484 (((mchunkptr)((char*)(p) + (s)))->prev_foot = ((size_t)(M) ^ mparams.magic))
2487 ((mstate)(((mchunkptr)((char*)(p) +\
2492 (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT), \
2497 (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT),\
2616 static void do_check_any_chunk(mstate m, mchunkptr p) { in do_check_any_chunk()
2622 static void do_check_top_chunk(mstate m, mchunkptr p) { in do_check_top_chunk()
2636 static void do_check_mmapped_chunk(mstate m, mchunkptr p) { in do_check_mmapped_chunk()
2650 static void do_check_inuse_chunk(mstate m, mchunkptr p) { in do_check_inuse_chunk()
2661 static void do_check_free_chunk(mstate m, mchunkptr p) { in do_check_free_chunk()
2663 mchunkptr next = chunk_plus_offset(p, sz); in do_check_free_chunk()
2686 mchunkptr p = mem2chunk(mem); in do_check_malloced_chunk()
2711 do_check_any_chunk(m, ((mchunkptr)u)); in do_check_tree()
2762 mchunkptr p = b->bk; in do_check_smallbin()
2769 mchunkptr q; in do_check_smallbin()
2784 static int bin_find(mstate m, mchunkptr x) { in bin_find()
2790 mchunkptr p = b; in bin_find()
2826 mchunkptr q = align_as_chunk(s->base); in traverse_and_check()
2827 mchunkptr lastq = 0; in traverse_and_check()
2893 mchunkptr q = align_as_chunk(s->base); in internal_mallinfo()
2935 mchunkptr q = align_as_chunk(s->base); in internal_malloc_stats()
2966 mchunkptr B = smallbin_at(M, I);\
2967 mchunkptr F = B;\
2984 mchunkptr F = P->fd;\
2985 mchunkptr B = P->bk;\
3004 mchunkptr F = P->fd;\
3024 mchunkptr DV = M->dv;\
3222 mchunkptr p = (mchunkptr)(mm + offset); in mmap_alloc()
3242 static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb) { in mmap_resize()
3258 mchunkptr newp = (mchunkptr)(cp + offset); in mmap_resize()
3279 static void init_top(mstate m, mchunkptr p, size_t psize) { in init_top()
3282 p = (mchunkptr)((char*)p + offset); in init_top()
3325 mchunkptr p = align_as_chunk(newbase); in prepend_alloc()
3326 mchunkptr oldfirst = align_as_chunk(oldbase); in prepend_alloc()
3328 mchunkptr q = chunk_plus_offset(p, nb); in prepend_alloc()
3376 mchunkptr sp = (mchunkptr)csp; in add_segment()
3378 mchunkptr tnext = chunk_plus_offset(sp, ssize); in add_segment()
3379 mchunkptr p = tnext; in add_segment()
3383 init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE); in add_segment()
3396 mchunkptr nextp = chunk_plus_offset(p, SIZE_T_SIZE); in add_segment()
3408 mchunkptr q = (mchunkptr)old_top; in add_segment()
3410 mchunkptr tn = chunk_plus_offset(q, psize); in add_segment()
3555 init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE); in sys_alloc()
3558 mchunkptr mn = next_chunk(mem2chunk(m)); in sys_alloc()
3598 mchunkptr p = m->top; in sys_alloc()
3599 mchunkptr r = m->top = chunk_plus_offset(p, nb); in sys_alloc()
3624 mchunkptr p = align_as_chunk(base); in release_unused_segments()
3774 mchunkptr r = chunk_plus_offset(v, nb); in tmalloc_large()
3813 mchunkptr r = chunk_plus_offset(v, nb); in tmalloc_small()
3840 mchunkptr oldp = mem2chunk(oldmem); in internal_realloc()
3842 mchunkptr next = chunk_plus_offset(oldp, oldsize); in internal_realloc()
3843 mchunkptr newp = 0; in internal_realloc()
3857 mchunkptr remainder = chunk_plus_offset(newp, nb); in internal_realloc()
3867 mchunkptr newtop = chunk_plus_offset(oldp, nb); in internal_realloc()
3928 mchunkptr p = mem2chunk(mem); in internal_memalign()
3946 mchunkptr newp = (mchunkptr)pos; in internal_memalign()
3967 mchunkptr remainder = chunk_plus_offset(p, nb); in internal_memalign()
4010 mchunkptr p; /* corresponding chunk */ in ialloc()
4013 mchunkptr array_chunk; /* chunk for malloced ptr array */ in ialloc()
4158 mchunkptr b, p; in dlmalloc()
4172 mchunkptr b, p, r; in dlmalloc()
4215 mchunkptr p = gm->dv; in dlmalloc()
4217 mchunkptr r = gm->dv = chunk_plus_offset(p, nb); in dlmalloc()
4235 mchunkptr p = gm->top; in dlmalloc()
4236 mchunkptr r = gm->top = chunk_plus_offset(p, nb); in dlmalloc()
4263 mchunkptr p = mem2chunk(mem); in dlfree()
4277 mchunkptr next = chunk_plus_offset(p, psize); in dlfree()
4288 mchunkptr prev = chunk_minus_offset(p, prevsize); in dlfree()
4451 mchunkptr p = mem2chunk(mem); in dlmalloc_usable_size()
4470 mchunkptr mn; in init_user_mstate()
4471 mchunkptr msp = align_as_chunk(tbase); in init_user_mstate()
4565 mchunkptr b, p; in mspace_malloc()
4579 mchunkptr b, p, r; in mspace_malloc()
4622 mchunkptr p = ms->dv; in mspace_malloc()
4624 mchunkptr r = ms->dv = chunk_plus_offset(p, nb); in mspace_malloc()
4642 mchunkptr p = ms->top; in mspace_malloc()
4643 mchunkptr r = ms->top = chunk_plus_offset(p, nb); in mspace_malloc()
4664 mchunkptr p = mem2chunk(mem); in mspace_free()
4678 mchunkptr next = chunk_plus_offset(p, psize); in mspace_free()
4689 mchunkptr prev = chunk_minus_offset(p, prevsize); in mspace_free()
4784 mchunkptr p = mem2chunk(oldmem); in mspace_realloc()