Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 933cadf in mainline for kernel/generic/src/mm/frame.c


Ignore:
Timestamp:
2011-04-22T13:35:41Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial
Children:
3dbe4ca2, afdcc60e, b678410
Parents:
74c8f344
Message:

use binary suffixes in printouts where appropriate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/frame.c

    r74c8f344 r933cadf  
    6060#include <macros.h>
    6161#include <config.h>
     62#include <str.h>
    6263
    6364zones_t zones;
     
    13951396        bool available = zone_flags_available(flags);
    13961397       
     1398        uint64_t size;
     1399        const char *size_suffix;
     1400        bin_order_suffix(FRAMES2SIZE(count), &size, &size_suffix, false);
     1401       
    13971402        printf("Zone number:       %zu\n", znum);
    13981403        printf("Zone base address: %p\n", (void *) base);
    1399         printf("Zone size:         %zu frames (%zu KiB)\n", count,
    1400             SIZE2KB(FRAMES2SIZE(count)));
     1404        printf("Zone size:         %zu frames (%" PRIu64 " %s)\n", count,
     1405            size, size_suffix);
    14011406        printf("Zone flags:        %c%c%c\n",
    14021407            available ? 'A' : ' ',
     
    14051410       
    14061411        if (available) {
    1407                 printf("Allocated space:   %zu frames (%zu KiB)\n",
    1408                     busy_count, SIZE2KB(FRAMES2SIZE(busy_count)));
    1409                 printf("Available space:   %zu frames (%zu KiB)\n",
    1410                     free_count, SIZE2KB(FRAMES2SIZE(free_count)));
     1412                bin_order_suffix(FRAMES2SIZE(busy_count), &size, &size_suffix,
     1413                    false);
     1414                printf("Allocated space:   %zu frames (%" PRIu64 " %s)\n",
     1415                    busy_count, size, size_suffix);
     1416                bin_order_suffix(FRAMES2SIZE(free_count), &size, &size_suffix,
     1417                    false);
     1418                printf("Available space:   %zu frames (%" PRIu64 " %s)\n",
     1419                    free_count, size, size_suffix);
    14111420        }
    14121421}
Note: See TracChangeset for help on using the changeset viewer.