Index: generic/src/mm/as.c
===================================================================
--- generic/src/mm/as.c	(revision 428aabf28c24869816fc053ab91991e8942c8cfc)
+++ generic/src/mm/as.c	(revision 3260ada0a610265704b488bdaf4d54effd91d7d6)
@@ -66,5 +66,5 @@
 {
 	as_arch_init();
-	AS_KERNEL = as_create(FLAG_AS_KERNEL);
+	AS_KERNEL = as_create(FLAG_AS_KERNEL | FLAG_AS_EARLYMALLOC);
         if (!AS_KERNEL)
                 panic("can't create kernel address space\n");
@@ -79,5 +79,8 @@
 	as_t *as;
 
-	as = (as_t *) early_malloc(sizeof(as_t));
+	if (flags & FLAG_AS_EARLYMALLOC)
+		as = (as_t *) early_malloc(sizeof(as_t));
+	else
+		as = (as_t *) malloc(sizeof(as_t));
 	if (as) {
 		list_initialize(&as->as_with_asid_link);
Index: generic/src/mm/slab.c
===================================================================
--- generic/src/mm/slab.c	(revision 428aabf28c24869816fc053ab91991e8942c8cfc)
+++ generic/src/mm/slab.c	(revision 3260ada0a610265704b488bdaf4d54effd91d7d6)
@@ -756,4 +756,8 @@
 	spinlock_unlock(&slab_cache_lock);
 }
+
+#ifdef CONFIG_DEBUG
+static int _slab_initialized = 0;
+#endif
 
 void slab_cache_init(void)
@@ -789,4 +793,7 @@
 						     NULL,NULL,0);
 	}
+#ifdef CONFIG_DEBUG       
+	_slab_initialized = 1;
+#endif
 }
 
@@ -796,5 +803,6 @@
 {
 	int idx;
-	
+
+	ASSERT(_slab_initialized);
 	ASSERT( size && size <= (1 << SLAB_MAX_MALLOC_W));
 	
