* [PATCH] malloc: fix compile error, if sets macros
@ 2019-10-26 6:51 l00420122
0 siblings, 0 replies; only message in thread
From: l00420122 @ 2019-10-26 6:51 UTC (permalink / raw)
To: libc-alpha; +Cc: hushiyuan
From: liusirui <liusirui@huawei.com>
Since e9c4fe93b3855239752819303ca377dff0ed0553, the commit changes struct
malloc_chunk member "size" to "mchunk_size". This cause a compile error
in function dump_heap, with macros MALLOC_DEBUG > 1.
---
malloc/arena.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/malloc/arena.c b/malloc/arena.c
index 74815ac..be5c9f9 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -419,13 +419,13 @@ dump_heap (heap_info *heap)
~MALLOC_ALIGN_MASK);
for (;; )
{
- fprintf (stderr, "chunk %p size %10lx", p, (long) p->size);
+ fprintf (stderr, "chunk %p size %10lx", p, (long) 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))
{
fprintf (stderr, " (fence)\n");
break;
--
2.7.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-26 6:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-26 6:51 [PATCH] malloc: fix compile error, if sets macros l00420122
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).