Changeset 59adc2b in mainline for generic/src/mm/buddy.c


Ignore:
Timestamp:
2006-01-08T15:18:33Z (19 years ago)
Author:
Sergey Bondari <bondari@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
677a6d5
Parents:
1a67595
Message:

Minor changes to 'zone' command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/mm/buddy.c

    r1a67595 r59adc2b  
    239239 * @param es Element size
    240240 */
    241 void buddy_system_structure_print(buddy_system_t *b) {
     241void buddy_system_structure_print(buddy_system_t *b, size_t elem_size) {
    242242        index_t i;
    243243        count_t cnt, elem_count = 0, block_count = 0;
     
    245245       
    246246
    247         printf("Order\tStatistics\n");
    248         printf("-----\t--------------------------------------\n");
     247        printf("Order\tBlocks\tSize    \tBlock size\tElems per block\n");
     248        printf("-----\t------\t--------\t----------\t---------------\n");
    249249       
    250250        for (i=0;i < b->max_order; i++) {
     
    254254                }
    255255       
    256                 printf("#%d:\t%d blocks available (%d elements per block)\n", i, cnt, 1 << i);
     256                printf("#%d\t%d\t%d kb\t\t%d kb\t\t%d\n", i, cnt, (cnt * (1 << i) * elem_size) >> 10, ((1 << i) * elem_size) >> 10, 1 << i);
    257257               
    258258                block_count += cnt;
    259259                elem_count += (1 << i) * cnt;
    260260        }
    261         printf("-----\t--------------------------------------\n");
     261        printf("-----\t------\t--------\t----------\t---------------\n");
    262262        printf("Buddy system contains %d elements (%d blocks)\n" , elem_count, block_count);
    263263
Note: See TracChangeset for help on using the changeset viewer.