Changes in kernel/generic/src/mm/frame.c [8d308b9:933cadf] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/frame.c
r8d308b9 r933cadf 182 182 * 183 183 */ 184 NO_TRACE static size_t frame_total_free_get_internal(void) 184 #ifdef CONFIG_DEBUG 185 NO_TRACE static size_t total_frames_free(void) 185 186 { 186 187 size_t total = 0; 187 188 size_t i; 188 189 189 for (i = 0; i < zones.count; i++) 190 190 total += zones.info[i].free_count; … … 192 192 return total; 193 193 } 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 */ 206 195 207 196 /** Find a zone with a given frames. … … 851 840 buddy_system_free(zone->buddy_system, &zone->frames[i].buddy_link); 852 841 } 842 843 /* "Unreserve" new frames. */ 844 reserve_free(count); 853 845 } else 854 846 zone->frames = NULL; … … 1059 1051 1060 1052 #ifdef CONFIG_DEBUG 1061 size_t avail = frame_total_free_get_internal();1053 size_t avail = total_frames_free(); 1062 1054 #endif 1063 1055
Note:
See TracChangeset
for help on using the changeset viewer.