This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] malloc: fix compile error
- From: liqingqing <liqingqing3 at huawei dot com>
- To: liusirui <liusirui at huawei dot com>, <libc-alpha at sourceware dot org>
- Cc: <carlos at redhat dot com>, <siddhesh at gotplt dot org>, <dj at redhat dot com>, <hushiyuan at huawei dot com>
- Date: Mon, 13 Jan 2020 20:13:47 +0800
- Subject: Re: [PATCH] malloc: fix compile error
- References: <1578917307-37611-1-git-send-email-liusirui@huawei.com>
On 2020/1/13 20:08, liusirui wrote:
> Since e9c4fe93b3855239752819303ca377dff0ed0553, the commit changes struct
> malloc_chunk member "size" to "mchunk_size". This cause a compile error
> in function dump_heap, if macros MALLOC_DEBUG has defined and the value is
> larger 1.
> for (;; )
> {
> - fprintf (stderr, "chunk %p size %10lx", p, (long) p->size);
> + fprintf (stderr, "chunk %p size %10lx", p, (long) chunksize_nomask(p));
chunksize_nomask(p) add a white space like that "chunksize_nomask (p)"
> if (p == top (heap->ar_ptr))
> {
> fprintf (stderr, " (top)\n");
> break;
> }
> - else if (p->size == (0 | PREV_INUSE))
> + else if (chunksize_nomask(p) == (0 | PREV_INUSE))
chunksize_nomask(p) add a white space like that "chunksize_nomask (p)"
> {
> fprintf (stderr, " (fence)\n");
> break;
>