change log for rtems (2011-07-18)

rtems-vc at rtems.org rtems-vc at rtems.org
Mon Jul 18 09:11:37 UTC 2011


 *sh*:
2011-07-18	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* libcsupport/src/malloc_report_statistics_plugin.c: Fixed format
	specifiers.

M 1.2876  cpukit/ChangeLog
M    1.4  cpukit/libcsupport/src/malloc_report_statistics_plugin.c

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
@@ -1,3 +1,8 @@
+2011-07-18	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
+	* libcsupport/src/malloc_report_statistics_plugin.c: Fixed format
+	specifiers.
+
 2011-07-15	Jennifer Averett <Jennifer.Averett at OARcorp.com>
 
 	* score/Makefile.am, score/preinstall.am,

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
@@ -24,27 +24,27 @@
   rtems_printk_plugin_t  print
 )
 {
-  rtems_malloc_statistics_t *s;
-  uintmax_t allocated;
-
-  s = &rtems_malloc_statistics;
-
-  allocated  = s->lifetime_allocated - s->lifetime_freed;
+  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;
 
   (*print)(
     context,
     "Malloc statistics\n"
-    "  avail:%"PRIu32"k  allocated:%"PRIu32"k (%"PRId32"%%) "
+    "  avail:%"PRIu32"k  allocated:%"PRIu32"k (%"PRIu32"%%) "
       "max:%"PRIu32"k (%"PRIu32"%%)"
-      " lifetime:%"PRIu32"k freed:%"PRIu32"k\n",
-    s->space_available / 1024,
+      " lifetime:%"PRIuMAX"k freed:%"PRIuMAX"k\n",
+    space_available / 1024,
     allocated / 1024,
-    /* 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)
+    allocated_per_cent,
+    max_depth / 1024,
+    max_depth_per_cent,
+    s->lifetime_allocated / 1024,
+    s->lifetime_freed / 1024
   );
   (*print)(
     context,



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110718/1f467036/attachment.html>


More information about the vc mailing list