<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-07-18)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>sh</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-07-18 Sebastian Huber <sebastian.huber@embedded-brains.de>

        * libcsupport/src/malloc_report_statistics_plugin.c: Fixed format
        specifiers.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2875&r2=text&tr2=1.2876&diff_format=h">M</a></td><td width='1%'>1.2876</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/malloc_report_statistics_plugin.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libcsupport/src/malloc_report_statistics_plugin.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2875 rtems/cpukit/ChangeLog:1.2876
--- rtems/cpukit/ChangeLog:1.2875       Fri Jul 15 09:36:36 2011
+++ rtems/cpukit/ChangeLog      Mon Jul 18 03:44:55 2011
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2011-07-18    Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+       * libcsupport/src/malloc_report_statistics_plugin.c: Fixed format
+       specifiers.
+
</font> 2011-07-15        Jennifer Averett <Jennifer.Averett@OARcorp.com>
 
        * score/Makefile.am, score/preinstall.am,

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/malloc_report_statistics_plugin.c:1.3 rtems/cpukit/libcsupport/src/malloc_report_statistics_plugin.c:1.4
--- rtems/cpukit/libcsupport/src/malloc_report_statistics_plugin.c:1.3  Mon Sep 14 09:48:38 2009
+++ rtems/cpukit/libcsupport/src/malloc_report_statistics_plugin.c      Mon Jul 18 03:44:55 2011
</font><font color='#997700'>@@ -24,27 +24,27 @@
</font>   rtems_printk_plugin_t  print
 )
 {
<font color='#880000'>-  rtems_malloc_statistics_t *s;
-  uintmax_t allocated;
-
-  s = &rtems_malloc_statistics;
-
-  allocated  = s->lifetime_allocated - s->lifetime_freed;
</font><font color='#000088'>+  rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
+  uint32_t space_available = s->space_available;
+  uint32_t allocated = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
+  uint32_t max_depth = s->max_depth;
+    /* avoid float! */
+  uint32_t allocated_per_cent = (allocated * 100) / space_available;
+  uint32_t max_depth_per_cent = (max_depth * 100) / space_available;
</font> 
   (*print)(
     context,
     "Malloc statistics\n"
<font color='#880000'>-    "  avail:%"PRIu32"k  allocated:%"PRIu32"k (%"PRId32"%%) "
</font><font color='#000088'>+    "  avail:%"PRIu32"k  allocated:%"PRIu32"k (%"PRIu32"%%) "
</font>       "max:%"PRIu32"k (%"PRIu32"%%)"
<font color='#880000'>-      " lifetime:%"PRIu32"k freed:%"PRIu32"k\n",
-    s->space_available / 1024,
</font><font color='#000088'>+      " lifetime:%"PRIuMAX"k freed:%"PRIuMAX"k\n",
+    space_available / 1024,
</font>     allocated / 1024,
<font color='#880000'>-    /* avoid float! */
-    (allocated * 100) / s->space_available,
-    s->max_depth / 1024,
-    (s->max_depth * 100) / s->space_available,
-    (uint32_t) (s->lifetime_allocated / 1024),
-    (uint32_t) (s->lifetime_freed / 1024)
</font><font color='#000088'>+    allocated_per_cent,
+    max_depth / 1024,
+    max_depth_per_cent,
+    s->lifetime_allocated / 1024,
+    s->lifetime_freed / 1024
</font>   );
   (*print)(
     context,
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>