Changes in kernel/generic/src/mm/frame.c [9dae191e:d99c1d2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/frame.c
r9dae191e rd99c1d2 1202 1202 1203 1203 /** Return total size of all zones. */ 1204 uint64_t zone s_total_size(void)1204 uint64_t zone_total_size(void) 1205 1205 { 1206 1206 ipl_t ipl = interrupts_disable(); … … 1218 1218 } 1219 1219 1220 void zones_stats(uint64_t *total, uint64_t *unavail, uint64_t *busy,1221 uint64_t *free)1222 {1223 ASSERT(total != NULL);1224 ASSERT(unavail != NULL);1225 ASSERT(busy != NULL);1226 ASSERT(free != NULL);1227 1228 ipl_t ipl = interrupts_disable();1229 spinlock_lock(&zones.lock);1230 1231 *total = 0;1232 *unavail = 0;1233 *busy = 0;1234 *free = 0;1235 1236 size_t i;1237 for (i = 0; i < zones.count; i++) {1238 *total += (uint64_t) FRAMES2SIZE(zones.info[i].count);1239 1240 if (zone_flags_available(zones.info[i].flags)) {1241 *busy += (uint64_t) FRAMES2SIZE(zones.info[i].busy_count);1242 *free += (uint64_t) FRAMES2SIZE(zones.info[i].free_count);1243 } else1244 *unavail += (uint64_t) FRAMES2SIZE(zones.info[i].count);1245 }1246 1247 spinlock_unlock(&zones.lock);1248 interrupts_restore(ipl);1249 }1250 1251 1220 /** Prints list of zones. */ 1252 void zone s_print_list(void)1221 void zone_print_list(void) 1253 1222 { 1254 1223 #ifdef __32_BITS__
Note:
See TracChangeset
for help on using the changeset viewer.