Index: test/mm/falloc1/test.c
===================================================================
--- test/mm/falloc1/test.c	(revision bd6e392fb9a42852294e181af5e1bd31204dcaf3)
+++ test/mm/falloc1/test.c	(revision 895be41b23cd9c7c75fc351d2b4a2dd975238de9)
@@ -30,14 +30,15 @@
 #include <mm/page.h>
 #include <mm/frame.h>
+#include <mm/heap.h>
 #include <arch/mm/page.h>
 #include <arch/types.h>
 #include <debug.h>
 
-#define MAX_FRAMES 2048
+#define MAX_FRAMES 1024
 #define MAX_ORDER 8
-#define TEST_RUNS 4
+#define TEST_RUNS 2
 
 void test(void) {
-	__address frames[MAX_FRAMES];
+	__address * frames = (__address *) malloc(MAX_FRAMES*sizeof(__address));
 	int results[MAX_ORDER+1];
 	
@@ -53,5 +54,5 @@
 			allocated = 0;
 			for (i=0;i<MAX_FRAMES>>order;i++) {
-				frames[allocated] = frame_alloc(FRAME_NON_BLOCKING, order, &status);
+				frames[allocated] = frame_alloc(FRAME_NON_BLOCKING | FRAME_KA, order, &status);
 				
 				if (frames[allocated] % (FRAME_SIZE << order) != 0) {
@@ -83,5 +84,5 @@
 	}
 
-
+	free(frames);
 	
 	printf("Test passed\n");
Index: test/mm/falloc2/test.c
===================================================================
--- test/mm/falloc2/test.c	(revision bd6e392fb9a42852294e181af5e1bd31204dcaf3)
+++ test/mm/falloc2/test.c	(revision 895be41b23cd9c7c75fc351d2b4a2dd975238de9)
@@ -30,4 +30,5 @@
 #include <mm/page.h>
 #include <mm/frame.h>
+#include <mm/heap.h>
 #include <arch/mm/page.h>
 #include <arch/types.h>
@@ -37,9 +38,9 @@
 #include <memstr.h>
 
-#define MAX_FRAMES 128
-#define MAX_ORDER 2
+#define MAX_FRAMES 256
+#define MAX_ORDER 8
 
 #define THREAD_RUNS 1
-#define THREADS 6
+#define THREADS 8
 
 static void thread(void * arg);
@@ -54,5 +55,5 @@
 	index_t k;
 	
-	__address frames[MAX_FRAMES];
+	__address * frames =  (__address *) malloc(MAX_FRAMES * sizeof(__address));
 
 	for (run=0;run<THREAD_RUNS;run++) {
@@ -61,5 +62,5 @@
 			printf("Thread #%d: Allocating %d frames blocks ... \n",val, 1<<order);
 			allocated = 0;
-			for (i=0;i<MAX_FRAMES>>order;i++) {
+			for (i=0;i < (MAX_FRAMES >> order);i++) {
 				frames[allocated] = frame_alloc(FRAME_NON_BLOCKING | FRAME_KA,order, &status);
 				if (status == 0) {
@@ -75,4 +76,5 @@
 			printf("Thread #%d: Deallocating ... \n", val);
 			for (i=0;i<allocated;i++) {
+			
 				for (k=0;k<=((FRAME_SIZE << order) - 1);k++) {
 					if ( ((char *) frames[i])[k] != val ) {
@@ -82,5 +84,5 @@
 				
 				}
-			
+				
 				frame_free(frames[i]);
 			}
