This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17039] New: malloc_info should use chunksize() for normal bins stats too
- From: "jipan.yang at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sun, 08 Jun 2014 09:06:38 +0000
- Subject: [Bug libc/17039] New: malloc_info should use chunksize() for normal bins stats too
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17039
Bug ID: 17039
Summary: malloc_info should use chunksize() for normal bins
stats too
Product: glibc
Version: 2.21
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: jipan.yang at gmail dot com
CC: drepper.fsp at gmail dot com
Fast bin is using "size_t thissize = chunksize (p);".
Using r->size directly gives wrong total and avail size data.
if (r != NULL)
while (r != bin)
{
++sizes[NFASTBINS - 1 + i].count;
sizes[NFASTBINS - 1 + i].total += r->size;
sizes[NFASTBINS - 1 + i].from
= MIN (sizes[NFASTBINS - 1 + i].from, r->size);
sizes[NFASTBINS - 1 + i].to = MAX (sizes[NFASTBINS - 1 + i].to,
r->size);
r = r->fd;
}
--
You are receiving this mail because:
You are on the CC list for the bug.