Changes in kernel/generic/src/mm/frame.c [d99c1d2:9dae191e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/frame.c
rd99c1d2 r9dae191e 1202 1202 1203 1203 /** Return total size of all zones. */ 1204 uint64_t zone _total_size(void)1204 uint64_t zones_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 } else 1244 *unavail += (uint64_t) FRAMES2SIZE(zones.info[i].count); 1245 } 1246 1247 spinlock_unlock(&zones.lock); 1248 interrupts_restore(ipl); 1249 } 1250 1220 1251 /** Prints list of zones. */ 1221 void zone _print_list(void)1252 void zones_print_list(void) 1222 1253 { 1223 1254 #ifdef __32_BITS__
Note:
See TracChangeset
for help on using the changeset viewer.