Ignore:
File:
1 edited

Legend:

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

    r8d308b9 r933cadf  
    182182 *
    183183 */
    184 NO_TRACE static size_t frame_total_free_get_internal(void)
     184#ifdef CONFIG_DEBUG
     185NO_TRACE static size_t total_frames_free(void)
    185186{
    186187        size_t total = 0;
    187188        size_t i;
    188 
    189189        for (i = 0; i < zones.count; i++)
    190190                total += zones.info[i].free_count;
     
    192192        return total;
    193193}
    194 
    195 NO_TRACE size_t frame_total_free_get(void)
    196 {
    197         size_t total;
    198 
    199         irq_spinlock_lock(&zones.lock, true);
    200         total = frame_total_free_get_internal();
    201         irq_spinlock_unlock(&zones.lock, true);
    202 
    203         return total;
    204 }
    205 
     194#endif /* CONFIG_DEBUG */
    206195
    207196/** Find a zone with a given frames.
     
    851840                        buddy_system_free(zone->buddy_system, &zone->frames[i].buddy_link);
    852841                }
     842
     843                /* "Unreserve" new frames. */
     844                reserve_free(count);
    853845        } else
    854846                zone->frames = NULL;
     
    10591051               
    10601052#ifdef CONFIG_DEBUG
    1061                 size_t avail = frame_total_free_get_internal();
     1053                size_t avail = total_frames_free();
    10621054#endif
    10631055               
Note: See TracChangeset for help on using the changeset viewer.