Index: generic/src/mm/buddy.c
===================================================================
--- generic/src/mm/buddy.c	(revision 0c0410bc99b71dff6df02ea3c82169ebbe228b12)
+++ generic/src/mm/buddy.c	(revision 263104be73a8ecd461f88defac229c671bd463fe)
@@ -232,6 +232,4 @@
 }
 
-
-
 /** Prints out structure of buddy system
  *
@@ -251,8 +249,9 @@
 		cnt = 0;
 		if (!list_empty(&b->order[i])) {
-			for (cur = b->order[i].next; cur != &b->order[i]; cur = cur->next) cnt++;
-		}
-	
-		printf("#%d\t%d\t%d kb\t\t%d kb\t\t%d\n", i, cnt, (cnt * (1 << i) * elem_size) >> 10, ((1 << i) * elem_size) >> 10, 1 << i);
+			for (cur = b->order[i].next; cur != &b->order[i]; cur = cur->next)
+				cnt++;
+		}
+	
+		printf("#%d\t%d\t%dK\t\t%dK\t\t%d\n", i, cnt, (cnt * (1 << i) * elem_size) >> 10, ((1 << i) * elem_size) >> 10, 1 << i);
 		
 		block_count += cnt;
@@ -260,5 +259,5 @@
 	}
 	printf("-----\t------\t--------\t----------\t---------------\n");
-	printf("Buddy system contains %d elements (%d blocks)\n" , elem_count, block_count);
-
-}
+	printf("Buddy system contains %d free elements (%d blocks)\n" , elem_count, block_count);
+
+}
Index: generic/src/mm/frame.c
===================================================================
--- generic/src/mm/frame.c	(revision 0c0410bc99b71dff6df02ea3c82169ebbe228b12)
+++ generic/src/mm/frame.c	(revision 263104be73a8ecd461f88defac229c671bd463fe)
@@ -118,6 +118,4 @@
 			panic("Can't allocate frame.\n");
 		
-		
-		
 		/*
 		 * TODO: Sleep until frames are available again.
@@ -155,5 +153,4 @@
 	spinlock_unlock(&zone_head_lock);
 	interrupts_restore(ipl);
-
 
 	if (flags & FRAME_KA)
@@ -206,4 +203,5 @@
 			break;
 		}
+
 		spinlock_unlock(&z->lock);
 	}
@@ -503,4 +501,7 @@
 	zone_t *zone = NULL;
 	link_t *cur;
+	ipl_t ipl;
+
+	ipl = interrupts_disable();
 	spinlock_lock(&zone_head_lock);
 	printf("Base address\tFree Frames\tBusy Frames\n");
@@ -510,7 +511,8 @@
 		spinlock_lock(&zone->lock);
 		printf("%L\t%d\t\t%d\n",zone->base, zone->free_count, zone->busy_count);
+		spinlock_unlock(&zone->lock);
 	}
 	spinlock_unlock(&zone_head_lock);
-
+	interrupts_restore(ipl);
 }
 
@@ -522,8 +524,8 @@
 	zone_t *zone = NULL, *z	;
 	link_t *cur;
-	
-	
+	ipl_t ipl;
+
+	ipl = interrupts_disable();
 	spinlock_lock(&zone_head_lock);
-	
 	
 	for (cur = zone_head.next; cur != &zone_head; cur = cur->next) {
@@ -535,6 +537,7 @@
 	}
 	
-	
 	if (!zone) {
+		spinlock_unlock(&zone_head_lock);
+		interrupts_restore(ipl);
 		printf("No zone with address %X\n", base);
 		return;
@@ -544,7 +547,7 @@
 	printf("Memory zone information\n\n");
 	printf("Zone base address: %P\n", zone->base);
-	printf("Zone size: %d frames (%d kbytes)\n", zone->free_count + zone->busy_count, ((zone->free_count + zone->busy_count) * FRAME_SIZE) >> 10);
-	printf("Allocated space: %d frames (%d kbytes)\n", zone->busy_count, (zone->busy_count * FRAME_SIZE) >> 10);
-	printf("Available space: %d (%d kbytes)\n", zone->free_count, (zone->free_count * FRAME_SIZE) >> 10);
+	printf("Zone size: %d frames (%dK)\n", zone->free_count + zone->busy_count, ((zone->free_count + zone->busy_count) * FRAME_SIZE) >> 10);
+	printf("Allocated space: %d frames (%dK)\n", zone->busy_count, (zone->busy_count * FRAME_SIZE) >> 10);
+	printf("Available space: %d (%dK)\n", zone->free_count, (zone->free_count * FRAME_SIZE) >> 10);
 	
 	printf("\nBuddy allocator structures:\n\n");
@@ -553,5 +556,5 @@
 	spinlock_unlock(&zone->lock);
 	spinlock_unlock(&zone_head_lock);
-	
-}
-
+	interrupts_restore(ipl);
+}
+
