Index: kernel/arch/sparc64/include/arch/proc/thread.h
===================================================================
--- kernel/arch/sparc64/include/arch/proc/thread.h	(revision 751032650a0af420a9d0763cf66c6c43bdc89800)
+++ kernel/arch/sparc64/include/arch/proc/thread.h	(revision 5c2af75dfaacd671a4ad11ffb003e457f12d538e)
@@ -38,4 +38,7 @@
 #include <typedefs.h>
 #include <arch/arch.h>
+#include <mm/slab.h>
+
+extern slab_cache_t *uwb_cache;
 
 typedef struct {
Index: kernel/arch/sparc64/include/arch/trap/regwin.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/regwin.h	(revision 751032650a0af420a9d0763cf66c6c43bdc89800)
+++ kernel/arch/sparc64/include/arch/trap/regwin.h	(revision 5c2af75dfaacd671a4ad11ffb003e457f12d538e)
@@ -77,5 +77,4 @@
 #define UWB_SIZE	((NWINDOWS - 1) * STACK_WINDOW_SAVE_AREA_SIZE)
 #define UWB_ALIGNMENT	1024
-#define UWB_ASIZE	ALIGN_UP(UWB_SIZE, UWB_ALIGNMENT)
 
 #ifdef __ASM__
Index: kernel/arch/sparc64/src/proc/thread.c
===================================================================
--- kernel/arch/sparc64/src/proc/thread.c	(revision 751032650a0af420a9d0763cf66c6c43bdc89800)
+++ kernel/arch/sparc64/src/proc/thread.c	(revision 5c2af75dfaacd671a4ad11ffb003e457f12d538e)
@@ -39,4 +39,6 @@
 #include <align.h>
 
+slab_cache_t *uwb_cache = NULL;
+
 void thr_constructor_arch(thread_t *t)
 {
@@ -55,5 +57,6 @@
 		 * belonging to a killed thread.
 		 */
-		free((uint8_t *) ALIGN_DOWN(uw_buf, UWB_ALIGNMENT));
+		slab_free(uwb_cache, (uint8_t *) ALIGN_DOWN(uw_buf,
+		    UWB_ALIGNMENT));
 	}
 }
@@ -67,5 +70,5 @@
 		 * returned from the slab allocator doesn't have any.
 		 */
-		t->arch.uspace_window_buffer = malloc(UWB_ASIZE, 0);
+		t->arch.uspace_window_buffer = slab_alloc(uwb_cache, 0);
 	} else {
 		uintptr_t uw_buf = (uintptr_t) t->arch.uspace_window_buffer;
@@ -76,5 +79,5 @@
 		 */
 		t->arch.uspace_window_buffer = (uint8_t *) ALIGN_DOWN(uw_buf,
-		    UWB_ASIZE);
+		    UWB_ALIGNMENT);
 	}
 }
Index: kernel/arch/sparc64/src/sparc64.c
===================================================================
--- kernel/arch/sparc64/src/sparc64.c	(revision 751032650a0af420a9d0763cf66c6c43bdc89800)
+++ kernel/arch/sparc64/src/sparc64.c	(revision 5c2af75dfaacd671a4ad11ffb003e457f12d538e)
@@ -35,4 +35,9 @@
 #include <arch.h>
 #include <arch/arch.h>
+#include <mm/slab.h>
+#include <config.h>
+#include <arch/proc/thread.h>
+#include <arch/trap/regwin.h>
+#include <debug.h>
 
 #define SPARC64_ARCH_OP(op)	ARCH_STRUCT_OP(sparc64_ops, op)
@@ -62,4 +67,11 @@
 {
 	SPARC64_ARCH_OP(post_mm_init);
+
+	if (config.cpu_active == 1) {
+		STATIC_ASSERT(UWB_SIZE <= UWB_ALIGNMENT);
+		/* Create slab cache for the userspace window buffers */
+		uwb_cache = slab_cache_create("uwb_cache", UWB_SIZE,
+		    UWB_ALIGNMENT, NULL, NULL, SLAB_CACHE_MAGDEFERRED);
+	}
 }
 
