Changeset 2b8b0ca in mainline for kernel/generic/src/mm/frame.c
- Timestamp:
- 2008-06-03T14:46:49Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 93a3348
- Parents:
- 0f269c2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/frame.c
r0f269c2 r2b8b0ca 319 319 zone = (zone_t *) b->data; 320 320 index = frame_index(zone, frame); 321 printf("% zd", index);321 printf("%" PRIi, index); 322 322 } 323 323 … … 845 845 uintptr_t zone_conf_size(count_t count) 846 846 { 847 int size = sizeof(zone_t) + count *sizeof(frame_t);847 int size = sizeof(zone_t) + count * sizeof(frame_t); 848 848 int max_order; 849 849 … … 1160 1160 ipl = interrupts_disable(); 1161 1161 spinlock_lock(&zones.lock); 1162 1163 if (sizeof(void *) == 4) { 1164 printf("# base address free frames busy frames\n"); 1165 printf("-- ------------ ------------ ------------\n"); 1166 } else { 1167 printf("# base address free frames busy frames\n"); 1168 printf("-- -------------------- ------------ ------------\n"); 1169 } 1162 1163 #ifdef __32_BITS__ 1164 printf("# base address free frames busy frames\n"); 1165 printf("-- ------------ ------------ ------------\n"); 1166 #endif 1167 1168 #ifdef __64_BITS__ 1169 printf("# base address free frames busy frames\n"); 1170 printf("-- -------------------- ------------ ------------\n"); 1171 #endif 1170 1172 1171 1173 for (i = 0; i < zones.count; i++) { 1172 1174 zone = zones.info[i]; 1173 1175 spinlock_lock(&zone->lock); 1174 1175 if (sizeof(void *) == 4) 1176 printf("%-2d %#10zx %12zd %12zd\n", i, PFN2ADDR(zone->base), 1177 zone->free_count, zone->busy_count); 1178 else 1179 printf("%-2d %#18zx %12zd %12zd\n", i, PFN2ADDR(zone->base), 1180 zone->free_count, zone->busy_count); 1176 1177 #ifdef __32_BITS__ 1178 printf("%-2u %10p %12" PRIc " %12" PRIc "\n", i, PFN2ADDR(zone->base), 1179 zone->free_count, zone->busy_count); 1180 #endif 1181 1182 #ifdef __64_BITS__ 1183 printf("%-2u %18p %12" PRIc " %12" PRIc "\n", i, PFN2ADDR(zone->base), 1184 zone->free_count, zone->busy_count); 1185 #endif 1181 1186 1182 1187 spinlock_unlock(&zone->lock); … … 1212 1217 spinlock_lock(&zone->lock); 1213 1218 printf("Memory zone information\n"); 1214 printf("Zone base address: %#.*p\n", sizeof(uintptr_t) * 2, 1215 PFN2ADDR(zone->base)); 1216 printf("Zone size: %zd frames (%zd KB)\n", zone->count, 1219 printf("Zone base address: %p\n", PFN2ADDR(zone->base)); 1220 printf("Zone size: %" PRIc " frames (%" PRIs " KB)\n", zone->count, 1217 1221 SIZE2KB(FRAMES2SIZE(zone->count))); 1218 printf("Allocated space: % zd frames (%zdKB)\n", zone->busy_count,1222 printf("Allocated space: %" PRIc " frames (%" PRIs " KB)\n", zone->busy_count, 1219 1223 SIZE2KB(FRAMES2SIZE(zone->busy_count))); 1220 printf("Available space: % zd frames (%zdKB)\n", zone->free_count,1224 printf("Available space: %" PRIc " frames (%" PRIs " KB)\n", zone->free_count, 1221 1225 SIZE2KB(FRAMES2SIZE(zone->free_count))); 1222 1226 buddy_system_structure_print(zone->buddy_system, FRAME_SIZE);
Note:
See TracChangeset
for help on using the changeset viewer.