diff options
-rw-r--r-- | mm/page_alloc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 71a0b2a23f5b..423db0db7c02 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1491,7 +1491,7 @@ void show_free_areas(void) | |||
1491 | } | 1491 | } |
1492 | 1492 | ||
1493 | for_each_zone(zone) { | 1493 | for_each_zone(zone) { |
1494 | unsigned long nr, flags, order, total = 0; | 1494 | unsigned long nr[MAX_ORDER], flags, order, total = 0; |
1495 | 1495 | ||
1496 | show_node(zone); | 1496 | show_node(zone); |
1497 | printk("%s: ", zone->name); | 1497 | printk("%s: ", zone->name); |
@@ -1502,11 +1502,12 @@ void show_free_areas(void) | |||
1502 | 1502 | ||
1503 | spin_lock_irqsave(&zone->lock, flags); | 1503 | spin_lock_irqsave(&zone->lock, flags); |
1504 | for (order = 0; order < MAX_ORDER; order++) { | 1504 | for (order = 0; order < MAX_ORDER; order++) { |
1505 | nr = zone->free_area[order].nr_free; | 1505 | nr[order] = zone->free_area[order].nr_free; |
1506 | total += nr << order; | 1506 | total += nr[order] << order; |
1507 | printk("%lu*%lukB ", nr, K(1UL) << order); | ||
1508 | } | 1507 | } |
1509 | spin_unlock_irqrestore(&zone->lock, flags); | 1508 | spin_unlock_irqrestore(&zone->lock, flags); |
1509 | for (order = 0; order < MAX_ORDER; order++) | ||
1510 | printk("%lu*%lukB ", nr[order], K(1UL) << order); | ||
1510 | printk("= %lukB\n", K(total)); | 1511 | printk("= %lukB\n", K(total)); |
1511 | } | 1512 | } |
1512 | 1513 | ||