#1367 closed defect (fixed)

Malloc statistics wrong in R4.10

Reported by: Eric Norum Owned by: Sebastian Huber
Priority: normal Milestone: 4.11
Component: score Version: 4.10
Severity: normal Keywords:
Cc: joel.sherrill@…, norume@…, sebastian.huber@… Blocked By:
Blocking:

Description (last modified by Sebastian Huber)

The malloc statistics space_available value is not being set properly on startup.
Also the lifetime_allocated and lifetime_freed values are not being updated with the results of executive allocations when a unified pool is used.
=============
Here are some of Joel's comments from previous e-mails discussing this problem

length is the parameter passed in. So I am thinking there should
be a "protected heap get heap size" routine which gives the
full amount of memory. This way it would work either way.

Executive memory allocation requests go directly to the heap so the statistics are just counting
malloc/free. I am not even sure memalign() is getting counted
at the moment.

The statistics are at the malloc level not at the heap level
so the workspace heap accesses bypass it.

We would have to move the malloc statistics to the supercore
heap to get this capability.

Change History (7)

comment:1 Changed on 09/14/09 at 13:48:04 by Sebastian Huber

Owner: changed from Joel Sherrill to Sebastian Huber
Status: newassigned, sebastian.huber@embedded-brains.de

comment:2 Changed on 08/06/10 at 21:20:05 by Joel Sherrill

Cc: Joel Sherrill added

comment:3 Changed on 04/11/12 at 13:17:05 by Sebastian Huber

Replying to comment:7:

I don't have a problem merging the malloc stats into the heap IF they remain
pluggable so they drop out unless configured.

Why are the malloc() statistics configurable? The stuff in "malloc_statistics_helpers.c" doesn't look that resource intensive.

comment:4 Changed on 11/21/14 at 12:38:57 by Sebastian Huber

Description: modified (diff)
Milestone: 4.104.11

The malloc statistics should get removed. Instead the general heap handler statistics should be used and if necessary enhanced.

comment:5 Changed on 11/28/14 at 12:58:42 by Sebastian Huber

Resolution: fixed
Status: assignedclosed

comment:6 Changed on 12/12/14 at 07:25:47 by Sebastian Huber

Description: modified (diff)
Milestone: 4.104.11
Resolution: fixed
Status: assignedclosed

comment:7 Changed on 04/01/20 at 07:05:53 by Sebastian Huber <sebastian.huber@…>

In 8b8c068/rtems:

testsuites: Remove CONFIGURE_MALLOC_STATISTICS

This configuration option is obsolete since 2014.

Update #1367.

Note: See TracTickets for help on using tickets.