Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/frame.c

    r516adce rd99c1d2  
    12181218}
    12191219
    1220 void zone_busy_and_free(uint64_t *out_busy, uint64_t *out_free)
    1221 {
    1222         ipl_t ipl = interrupts_disable();
    1223         spinlock_lock(&zones.lock);
    1224 
    1225         uint64_t busy = 0, free = 0;
    1226         size_t i;
    1227         for (i = 0; i < zones.count; i++) {
    1228                 bool available = zone_flags_available(zones.info[i].flags);
    1229                 /* Do not count reserved memory */
    1230                 if (available) {
    1231                         busy += (uint64_t) FRAMES2SIZE(zones.info[i].busy_count);
    1232                         free += (uint64_t) FRAMES2SIZE(zones.info[i].free_count);
    1233                 }
    1234         }
    1235 
    1236         spinlock_unlock(&zones.lock);
    1237         interrupts_restore(ipl);
    1238         *out_busy = busy;
    1239         *out_free = free;
    1240 }
    1241 
    12421220/** Prints list of zones. */
    12431221void zone_print_list(void)
Note: See TracChangeset for help on using the changeset viewer.