Home | History | Annotate | Download | only in upstream-dlmalloc

Lines Matching refs:mchunkptr

2192 typedef struct malloc_chunk* mchunkptr;
2219 #define mem2chunk(mem) ((mchunkptr)((char*)(mem) - TWO_SIZE_T_SIZES))
2221 #define align_as_chunk(A) (mchunkptr)((A) + align_offset(chunk2mem(A)))
2269 #define chunk_plus_offset(p, s) ((mchunkptr)(((char*)(p)) + (s)))
2270 #define chunk_minus_offset(p, s) ((mchunkptr)(((char*)(p)) - (s)))
2273 #define next_chunk(p) ((mchunkptr)( ((char*)(p)) + ((p)->head & ~FLAG_BITS)))
2274 #define prev_chunk(p) ((mchunkptr)( ((char*)(p)) - ((p)->prev_foot) ))
2280 #define get_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot)
2281 #define set_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot = (s))
2585 mchunkptr dv;
2586 mchunkptr top;
2590 mchunkptr smallbins[(NSMALLBINS+1)*2];
2808 static void do_check_any_chunk(mstate m, mchunkptr p);
2809 static void do_check_top_chunk(mstate m, mchunkptr p);
2810 static void do_check_mmapped_chunk(mstate m, mchunkptr p);
2811 static void do_check_inuse_chunk(mstate m, mchunkptr p);
2812 static void do_check_free_chunk(mstate m, mchunkptr p);
2818 static int bin_find(mstate m, mchunkptr x);
3055 ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT)
3060 ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT)
3070 (((mchunkptr)((char*)(p) + (s)))->prev_foot = ((size_t)(M) ^ mparams.magic))
3073 ((mstate)(((mchunkptr)((char*)(p) +\
3078 (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT), \
3083 (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT),\
3233 static void do_check_any_chunk(mstate m, mchunkptr p) {
3239 static void do_check_top_chunk(mstate m, mchunkptr p) {
3253 static void do_check_mmapped_chunk(mstate m, mchunkptr p) {
3267 static void do_check_inuse_chunk(mstate m, mchunkptr p) {
3278 static void do_check_free_chunk(mstate m, mchunkptr p) {
3280 mchunkptr next = chunk_plus_offset(p, sz);
3303 mchunkptr p = mem2chunk(mem);
3328 do_check_any_chunk(m, ((mchunkptr)u));
3379 mchunkptr p = b->bk;
3386 mchunkptr q;
3401 static int bin_find(mstate m, mchunkptr x) {
3407 mchunkptr p = b;
3443 mchunkptr q = align_as_chunk(s->base);
3444 mchunkptr lastq = 0;
3512 mchunkptr q = align_as_chunk(s->base);
3556 mchunkptr q = align_as_chunk(s->base);
3586 mchunkptr B = smallbin_at(M, I);\
3587 mchunkptr F = B;\
3604 mchunkptr F = P->fd;\
3605 mchunkptr B = P->bk;\
3630 mchunkptr F = P->fd;\
3652 mchunkptr DV = M->dv;\
3852 mchunkptr p = (mchunkptr)(mm + offset);
3872 static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb, int flags) {
3888 mchunkptr newp = (mchunkptr)(cp + offset);
3910 static void init_top(mstate m, mchunkptr p, size_t psize) {
3913 p = (mchunkptr)((char*)p + offset);
3956 mchunkptr p = align_as_chunk(newbase);
3957 mchunkptr oldfirst = align_as_chunk(oldbase);
3959 mchunkptr q = chunk_plus_offset(p, nb);
4006 mchunkptr sp = (mchunkptr)csp;
4008 mchunkptr tnext = chunk_plus_offset(sp, ssize);
4009 mchunkptr p = tnext;
4013 init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
4026 mchunkptr nextp = chunk_plus_offset(p, SIZE_T_SIZE);
4038 mchunkptr q = (mchunkptr)old_top;
4040 mchunkptr tn = chunk_plus_offset(q, psize);
4209 init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
4214 mchunkptr mn = next_chunk(mem2chunk(m));
4253 mchunkptr p = m->top;
4254 mchunkptr r = m->top = chunk_plus_offset(p, nb);
4281 mchunkptr p = align_as_chunk(base);
4385 static void dispose_chunk(mstate m, mchunkptr p, size_t psize) {
4386 mchunkptr next = chunk_plus_offset(p, psize);
4388 mchunkptr prev;
4507 mchunkptr r = chunk_plus_offset(v, nb);
4545 mchunkptr r = chunk_plus_offset(v, nb);
4605 mchunkptr b, p;
4619 mchunkptr b, p, r;
4662 mchunkptr p = gm->dv;
4664 mchunkptr r = gm->dv = chunk_plus_offset(p, nb);
4682 mchunkptr p = gm->top;
4683 mchunkptr r = gm->top = chunk_plus_offset(p, nb);
4712 mchunkptr p = mem2chunk(mem);
4726 mchunkptr next = chunk_plus_offset(p, psize);
4736 mchunkptr prev = chunk_minus_offset(p, prevsize);
4833 static mchunkptr try_realloc_chunk(mstate m, mchunkptr p, size_t nb,
4835 mchunkptr newp = 0;
4837 mchunkptr next = chunk_plus_offset(p, oldsize);
4846 mchunkptr r = chunk_plus_offset(p, nb);
4857 mchunkptr newtop = chunk_plus_offset(p, nb);
4870 mchunkptr r = chunk_plus_offset(p, nb);
4871 mchunkptr n = chunk_plus_offset(r, dsize);
4897 mchunkptr r = chunk_plus_offset(p, nb);
4931 mchunkptr p = mem2chunk(mem);
4948 mchunkptr newp = (mchunkptr)pos;
4969 mchunkptr remainder = chunk_plus_offset(p, nb);
5003 mchunkptr p; /* corresponding chunk */
5006 mchunkptr array_chunk; /* chunk for malloced ptr array */
5127 mchunkptr p = mem2chunk(mem);
5139 mchunkptr next = next_chunk(p);
5170 mchunkptr top = m->top;
5173 mchunkptr q = align_as_chunk(s->base);
5175 mchunkptr next = next_chunk(q);
5222 mchunkptr oldp = mem2chunk(oldmem);
5233 mchunkptr newp = try_realloc_chunk(m, oldp, nb, 1);
5260 mchunkptr oldp = mem2chunk(oldmem);
5271 mchunkptr newp = try_realloc_chunk(m, oldp, nb, 0);
5410 mchunkptr p = mem2chunk(mem);
5425 mchunkptr mn;
5426 mchunkptr msp = align_as_chunk(tbase);
5541 mchunkptr b, p;
5555 mchunkptr b, p, r;
5598 mchunkptr p = ms->dv;
5600 mchunkptr r = ms->dv = chunk_plus_offset(p, nb);
5618 mchunkptr p = ms->top;
5619 mchunkptr r = ms->top = chunk_plus_offset(p, nb);
5640 mchunkptr p = mem2chunk(mem);
5655 mchunkptr next = chunk_plus_offset(p, psize);
5665 mchunkptr prev = chunk_minus_offset(p, prevsize);
5774 mchunkptr oldp = mem2chunk(oldmem);
5785 mchunkptr newp = try_realloc_chunk(m, oldp, nb, 1);
5812 mchunkptr oldp = mem2chunk(oldmem);
5824 mchunkptr newp = try_realloc_chunk(m, oldp, nb, 0);
5986 mchunkptr p = mem2chunk(mem);