Subversion Repositories HelenOS-historic

Rev

Rev 1221 | Rev 1236 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1221 Rev 1224
Line 1026... Line 1026...
1026
    printf("#  Base address\tFree Frames\tBusy Frames\n");
1026
    printf("#  Base address\tFree Frames\tBusy Frames\n");
1027
    printf("   ------------\t-----------\t-----------\n");
1027
    printf("   ------------\t-----------\t-----------\n");
1028
    for (i = 0; i < zones.count; i++) {
1028
    for (i = 0; i < zones.count; i++) {
1029
        zone = zones.info[i];
1029
        zone = zones.info[i];
1030
        spinlock_lock(&zone->lock);
1030
        spinlock_lock(&zone->lock);
1031
        printf("%d: %#x \t%zd\t\t%zd\n", i, PFN2ADDR(zone->base), zone->free_count, zone->busy_count);
1031
        printf("%d: %.*p \t%10zd\t%10zd\n", i, sizeof(__address) * 2, PFN2ADDR(zone->base), zone->free_count, zone->busy_count);
1032
        spinlock_unlock(&zone->lock);
1032
        spinlock_unlock(&zone->lock);
1033
    }
1033
    }
1034
    spinlock_unlock(&zones.lock);
1034
    spinlock_unlock(&zones.lock);
1035
    interrupts_restore(ipl);
1035
    interrupts_restore(ipl);
1036
}
1036
}
Line 1058... Line 1058...
1058
        goto out;
1058
        goto out;
1059
    }
1059
    }
1060
   
1060
   
1061
    spinlock_lock(&zone->lock);
1061
    spinlock_lock(&zone->lock);
1062
    printf("Memory zone information\n");
1062
    printf("Memory zone information\n");
1063
    printf("Zone base address: %#zX\n", PFN2ADDR(zone->base));
1063
    printf("Zone base address: %#.*p\n", sizeof(__address) * 2, PFN2ADDR(zone->base));
1064
    printf("Zone size: %zd frames (%zdK)\n", zone->count, ((zone->count) * FRAME_SIZE) >> 10);
1064
    printf("Zone size: %zd frames (%zdK)\n", zone->count, ((zone->count) * FRAME_SIZE) >> 10);
1065
    printf("Allocated space: %zd frames (%zdK)\n", zone->busy_count, (zone->busy_count * FRAME_SIZE) >> 10);
1065
    printf("Allocated space: %zd frames (%zdK)\n", zone->busy_count, (zone->busy_count * FRAME_SIZE) >> 10);
1066
    printf("Available space: %zd (%zdK)\n", zone->free_count, (zone->free_count * FRAME_SIZE) >> 10);
1066
    printf("Available space: %zd (%zdK)\n", zone->free_count, (zone->free_count * FRAME_SIZE) >> 10);
1067
    buddy_system_structure_print(zone->buddy_system, FRAME_SIZE);
1067
    buddy_system_structure_print(zone->buddy_system, FRAME_SIZE);
1068
   
1068