Index: kernel/generic/include/mm/buddy.h
===================================================================
--- kernel/generic/include/mm/buddy.h	(revision 000350f8d405354b13427e4e6079a75eb7503ba9)
+++ kernel/generic/include/mm/buddy.h	(revision 2ec725f323a83fee85ad7c1f75b8164d24daca8a)
@@ -67,5 +67,4 @@
 	/** Find parent of block that has given order  */
 	link_t *(* find_block)(struct buddy_system *, link_t *, uint8_t);
-	void (* print_id)(struct buddy_system *, link_t *);
 } buddy_system_operations_t;
 
@@ -79,12 +78,11 @@
 } buddy_system_t;
 
-extern void buddy_system_create(buddy_system_t *b, uint8_t max_order,
-    buddy_system_operations_t *op, void *data);
-extern link_t *buddy_system_alloc(buddy_system_t *b, uint8_t i);
-extern bool buddy_system_can_alloc(buddy_system_t *b, uint8_t order);
-extern void buddy_system_free(buddy_system_t *b, link_t *block);
-extern void buddy_system_structure_print(buddy_system_t *b, size_t elem_size);
-extern size_t buddy_conf_size(int max_order);
-extern link_t *buddy_system_alloc_block(buddy_system_t *b, link_t *block);
+extern void buddy_system_create(buddy_system_t *, uint8_t,
+    buddy_system_operations_t *, void *);
+extern link_t *buddy_system_alloc(buddy_system_t *, uint8_t);
+extern bool buddy_system_can_alloc(buddy_system_t *, uint8_t);
+extern void buddy_system_free(buddy_system_t *, link_t *);
+extern size_t buddy_conf_size(int);
+extern link_t *buddy_system_alloc_block(buddy_system_t *, link_t *);
 
 #endif
Index: kernel/generic/src/mm/buddy.c
===================================================================
--- kernel/generic/src/mm/buddy.c	(revision 000350f8d405354b13427e4e6079a75eb7503ba9)
+++ kernel/generic/src/mm/buddy.c	(revision 2ec725f323a83fee85ad7c1f75b8164d24daca8a)
@@ -36,6 +36,5 @@
  *
  * This file contains buddy system allocator framework.
- * Specialized functions are needed for this abstract framework
- * to be useful.
+ * Specialized functions are needed for this abstract framework to be useful.
  */
 
@@ -47,5 +46,5 @@
 #include <macros.h>
 
-/** Return size needed for the buddy configuration data */
+/** Return size needed for the buddy configuration data. */
 size_t buddy_conf_size(int max_order)
 {
@@ -54,19 +53,18 @@
 
 
-/** Create buddy system
+/** Create buddy system.
  *
  * Allocate memory for and initialize new buddy system.
  *
- * @param b Preallocated buddy system control data.
- * @param max_order The biggest allocable size will be 2^max_order.
- * @param op Operations for new buddy system.
- * @param data Pointer to be used by implementation.
- *
- * @return New buddy system.
- */
-void buddy_system_create(buddy_system_t *b,
-			 uint8_t max_order, 
-			 buddy_system_operations_t *op, 
-			 void *data)
+ * @param b		Preallocated buddy system control data.
+ * @param max_order	The biggest allocable size will be 2^max_order.
+ * @param op		Operations for new buddy system.
+ * @param data		Pointer to be used by implementation.
+ *
+ * @return		New buddy system.
+ */
+void
+buddy_system_create(buddy_system_t *b, uint8_t max_order,
+    buddy_system_operations_t *op, void *data)
 {
 	int i;
@@ -82,5 +80,5 @@
 
 	/*
-	 * Use memory after our own structure
+	 * Use memory after our own structure.
 	 */
 	b->order = (link_t *) (&b[1]);
@@ -94,12 +92,13 @@
 }
 
-/** Check if buddy system can allocate block
- *
- * @param b Buddy system pointer
- * @param i Size of the block (2^i)
- *
- * @return True if block can be allocated
- */
-bool buddy_system_can_alloc(buddy_system_t *b, uint8_t i) {
+/** Check if buddy system can allocate block.
+ *
+ * @param b		Buddy system pointer.
+ * @param i		Size of the block (2^i).
+ *
+ * @return		True if block can be allocated.
+ */
+bool buddy_system_can_alloc(buddy_system_t *b, uint8_t i)
+{
 	uint8_t k;
 	
@@ -108,10 +107,11 @@
 	 * we know immediatly that we cannot satisfy the request.
 	 */
-	if (i > b->max_order) return false;
+	if (i > b->max_order)
+		return false;
 
 	/*
 	 * Check if any bigger or equal order has free elements
 	 */
-	for (k=i; k <= b->max_order; k++) {
+	for (k = i; k <= b->max_order; k++) {
 		if (!list_empty(&b->order[k])) {
 			return true;
@@ -120,10 +120,9 @@
 	
 	return false;
-	
-}
-
-/** Allocate PARTICULAR block from buddy system
- *
- * @ return Block of data or NULL if no such block was found
+}
+
+/** Allocate PARTICULAR block from buddy system.
+ *
+ * @return		Block of data or NULL if no such block was found.
  */
 link_t *buddy_system_alloc_block(buddy_system_t *b, link_t *block)
@@ -136,5 +135,5 @@
 	list_remove(left);
 	while (1) {
-		if (! b->op->get_order(b,left)) {
+		if (!b->op->get_order(b, left)) {
 			b->op->mark_busy(b, left);
 			return left;
@@ -144,6 +143,6 @@
 
 		right = b->op->bisect(b, left);
-		b->op->set_order(b, left, order-1);
-		b->op->set_order(b, right, order-1);
+		b->op->set_order(b, left, order - 1);
+		b->op->set_order(b, right, order - 1);
 
 		tmp = b->op->find_block(b, block, BUDDY_SYSTEM_INNER_BLOCK);
@@ -162,8 +161,8 @@
 /** Allocate block from buddy system.
  *
- * @param b Buddy system pointer.
- * @param i Returned block will be 2^i big.
- *
- * @return Block of data represented by link_t.
+ * @param b		Buddy system pointer.
+ * @param i		Returned block will be 2^i big.
+ *
+ * @return		Block of data represented by link_t.
  */
 link_t *buddy_system_alloc(buddy_system_t *b, uint8_t i)
@@ -219,11 +218,10 @@
 	
 	return res;
-	
 }
 
 /** Return block to buddy system.
  *
- * @param b Buddy system pointer.
- * @param block Block to return.
+ * @param b		Buddy system pointer.
+ * @param block		Block to return.
  */
 void buddy_system_free(buddy_system_t *b, link_t *block)
@@ -269,5 +267,6 @@
 
 			/*
-			 * Recursively add the coalesced block to the list of order i + 1.
+			 * Recursively add the coalesced block to the list of
+			 * order i + 1.
 			 */
 			buddy_system_free(b, hlp);
@@ -280,43 +279,4 @@
 	 */
 	list_append(block, &b->order[i]);
-
-}
-
-/** Prints out structure of buddy system
- *
- * @param b Pointer to buddy system
- * @param elem_size Element size
- */
-void buddy_system_structure_print(buddy_system_t *b, size_t elem_size) {
-	index_t i;
-	count_t cnt, elem_count = 0, block_count = 0;
-	link_t *cur;
-	
-
-	printf("Order\tBlocks\tSize    \tBlock size\tElems per block\n");
-	printf("-----\t------\t--------\t----------\t---------------\n");
-	
-	for (i = 0;i <= b->max_order; i++) {
-		cnt = 0;
-		if (!list_empty(&b->order[i])) {
-			for (cur = b->order[i].next; cur != &b->order[i]; cur = cur->next)
-				cnt++;
-		}
-	
-		printf("#%" PRIi "\t%5" PRIc "\t%7" PRIc "K\t%8" PRIi "K\t%6u\t",
-			i, cnt, SIZE2KB(cnt * (1 << i) * elem_size), SIZE2KB((1 << i) * elem_size), 1 << i);
-		if (!list_empty(&b->order[i])) {
-			for (cur = b->order[i].next; cur != &b->order[i]; cur = cur->next) {
-				b->op->print_id(b, cur);
-				printf(" ");
-			}
-		}
-		printf("\n");
-			
-		block_count += cnt;
-		elem_count += (1 << i) * cnt;
-	}
-	printf("-----\t------\t--------\t----------\t---------------\n");
-	printf("Buddy system contains %" PRIc " free elements (%" PRIc " blocks)\n" , elem_count, block_count);
 }
 
Index: kernel/generic/src/mm/frame.c
===================================================================
--- kernel/generic/src/mm/frame.c	(revision 000350f8d405354b13427e4e6079a75eb7503ba9)
+++ kernel/generic/src/mm/frame.c	(revision 2ec725f323a83fee85ad7c1f75b8164d24daca8a)
@@ -319,16 +319,4 @@
 }
 
-static void zone_buddy_print_id(buddy_system_t *b, link_t *block)
-{
-	frame_t *frame;
-	zone_t *zone;
-	index_t index;
-
-	frame = list_get_instance(block, frame_t, buddy_link);
-	zone = (zone_t *) b->data;
-	index = frame_index(zone, frame);
-	printf("%" PRIi, index);
-}				     
-
 /** Buddy system find_buddy implementation.
  *
@@ -470,6 +458,5 @@
 	.mark_busy = zone_buddy_mark_busy,
 	.mark_available = zone_buddy_mark_available,
-	.find_block = zone_buddy_find_block,
-	.print_id = zone_buddy_print_id
+	.find_block = zone_buddy_find_block
 };
 
@@ -1284,4 +1271,8 @@
 	ipl_t ipl;
 	unsigned int i;
+	uintptr_t base;
+	count_t count;
+	count_t busy_count;
+	count_t free_count;
 
 	ipl = interrupts_disable();
@@ -1295,23 +1286,26 @@
 	}
 	if (!zone) {
+		spinlock_unlock(&zones.lock);
+		interrupts_restore(ipl);
 		printf("Zone not found.\n");
-		goto out;
+		return;
 	}
 	
 	spinlock_lock(&zone->lock);
-	printf("Memory zone information\n");
-	printf("Zone base address: %p\n", PFN2ADDR(zone->base));
-	printf("Zone size: %" PRIc " frames (%" PRIs " KB)\n", zone->count,
-	    SIZE2KB(FRAMES2SIZE(zone->count)));
-	printf("Allocated space: %" PRIc " frames (%" PRIs " KB)\n",
-	    zone->busy_count, SIZE2KB(FRAMES2SIZE(zone->busy_count)));
-	printf("Available space: %" PRIc " frames (%" PRIs " KB)\n",
-	    zone->free_count, SIZE2KB(FRAMES2SIZE(zone->free_count)));
-	buddy_system_structure_print(zone->buddy_system, FRAME_SIZE);
+	base = PFN2ADDR(zone->base);
+	count = zone->count;
+	busy_count = zone->busy_count;
+	free_count = zone->free_count;
 	spinlock_unlock(&zone->lock);
-	
-out:
 	spinlock_unlock(&zones.lock);
 	interrupts_restore(ipl);
+
+	printf("Zone base address: %p\n", base);
+	printf("Zone size: %" PRIc " frames (%" PRIs " KiB)\n", count,
+	    SIZE2KB(FRAMES2SIZE(count)));
+	printf("Allocated space: %" PRIc " frames (%" PRIs " KiB)\n",
+	    busy_count, SIZE2KB(FRAMES2SIZE(busy_count)));
+	printf("Available space: %" PRIc " frames (%" PRIs " KiB)\n",
+	    free_count, SIZE2KB(FRAMES2SIZE(free_count)));
 }
 
