#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 (6)

comment:1 Changed on Sep 14, 2009 at 1:48:04 PM by Sebastian Huber

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

comment:2 Changed on Aug 6, 2010 at 9:20:05 PM by Joel Sherrill

Cc: Joel Sherrill added

comment:3 Changed on Apr 11, 2012 at 1:17:05 PM 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 Nov 21, 2014 at 12:38:57 PM 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 Nov 28, 2014 at 12:58:42 PM by Sebastian Huber

Resolution: fixed
Status: assignedclosed

comment:6 Changed on Dec 12, 2014 at 7:25:47 AM by Sebastian Huber

Description: modified (diff)
Milestone: 4.104.11
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.