This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/17039] New: malloc_info should use chunksize() for normal bins stats too


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]