Index: kern/kern_exec.c
===================================================================
--- kern/kern_exec.c	(revision 183466)
+++ kern/kern_exec.c	(working copy)
@@ -1074,8 +1074,7 @@
 	 * o ARG_MAX for argument and environment;
 	 * o MAXSHELLCMDLEN for the name of interpreters.
 	 */
-	args->buf = (char *) kmem_alloc_wait(exec_map,
-	    PATH_MAX + ARG_MAX + MAXSHELLCMDLEN);
+	args->buf = (char *) uma_zalloc(exec_map, M_WAITOK);
 	if (args->buf == NULL)
 		return (ENOMEM);
 	args->begin_argv = args->buf;
@@ -1148,8 +1147,7 @@
 {
 
 	if (args->buf) {
-		kmem_free_wakeup(exec_map, (vm_offset_t)args->buf,
-		    PATH_MAX + ARG_MAX + MAXSHELLCMDLEN);
+		uma_zfree(exec_map, (void *)args->buf);
 		args->buf = NULL;
 	}
 }
Index: vm/vm_kern.c
===================================================================
--- vm/vm_kern.c	(revision 183466)
+++ vm/vm_kern.c	(working copy)
@@ -72,6 +72,7 @@
 #include <sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/proc.h>
+#include <sys/queue.h>
 #include <sys/malloc.h>
 
 #include <vm/vm.h>
@@ -86,7 +87,7 @@
 
 vm_map_t kernel_map=0;
 vm_map_t kmem_map=0;
-vm_map_t exec_map=0;
+uma_zone_t exec_map=0;
 vm_map_t pipe_map;
 vm_map_t buffer_map=0;
 
Index: vm/vm_kern.h
===================================================================
--- vm/vm_kern.h	(revision 183466)
+++ vm/vm_kern.h	(working copy)
@@ -63,11 +63,13 @@
 #ifndef _VM_VM_KERN_H_
 #define _VM_VM_KERN_H_ 1
 
+#include <vm/uma.h>
+
 /* Kernel memory management definitions. */
 extern vm_map_t buffer_map;
 extern vm_map_t kernel_map;
 extern vm_map_t kmem_map;
-extern vm_map_t exec_map;
+extern uma_zone_t exec_map;
 extern vm_map_t pipe_map;
 extern u_long vm_kmem_size;
 
Index: vm/vm_init.c
===================================================================
--- vm/vm_init.c	(revision 183466)
+++ vm/vm_init.c	(working copy)
@@ -66,6 +66,7 @@
 __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
+#include <sys/imgact.h>
 #include <sys/kernel.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
@@ -193,8 +194,9 @@
 	pager_map = kmem_suballoc(clean_map, &kmi->pager_sva, &kmi->pager_eva,
 	    nswbuf * MAXPHYS, FALSE);
 	pager_map->system_map = 1;
-	exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr,
-	    exec_map_entries * (ARG_MAX + (PAGE_SIZE * 3)), FALSE);
+	exec_map = uma_zcreate("exec map", PATH_MAX + ARG_MAX + MAXSHELLCMDLEN, NULL, NULL,
+	    NULL, NULL, 0, 0);
+	uma_zone_set_max(exec_map, exec_map_entries);
 	pipe_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, maxpipekva,
 	    FALSE);
 
Index: compat/freebsd32/freebsd32_misc.c
===================================================================
--- compat/freebsd32/freebsd32_misc.c	(revision 183466)
+++ compat/freebsd32/freebsd32_misc.c	(working copy)
@@ -254,8 +254,7 @@
 	 * Allocate temporary demand zeroed space for argument and
 	 *	environment strings
 	 */
-	args->buf = (char *) kmem_alloc_wait(exec_map,
-	    PATH_MAX + ARG_MAX + MAXSHELLCMDLEN);
+	args->buf = (char *) uma_zalloc(exec_map, M_WAITOK);
 	if (args->buf == NULL)
 		return (ENOMEM);
 	args->begin_argv = args->buf;
@@ -327,8 +326,7 @@
 	return (0);
 
 err_exit:
-	kmem_free_wakeup(exec_map, (vm_offset_t)args->buf,
-	    PATH_MAX + ARG_MAX + MAXSHELLCMDLEN);
+	uma_zfree(exec_map, (void *)args->buf);
 	args->buf = NULL;
 	return (error);
 }
Index: amd64/linux32/linux32_machdep.c
===================================================================
--- amd64/linux32/linux32_machdep.c	(revision 183466)
+++ amd64/linux32/linux32_machdep.c	(working copy)
@@ -124,8 +124,7 @@
 	 * Allocate temporary demand zeroed space for argument and
 	 *	environment strings
 	 */
-	args->buf = (char *)kmem_alloc_wait(exec_map,
-	    PATH_MAX + ARG_MAX + MAXSHELLCMDLEN);
+	args->buf = (char *)uma_zalloc(exec_map, M_WAITOK);
 	if (args->buf == NULL)
 		return (ENOMEM);
 	args->begin_argv = args->buf;
@@ -196,8 +195,7 @@
 	return (0);
 
 err_exit:
-	kmem_free_wakeup(exec_map, (vm_offset_t)args->buf,
-	    PATH_MAX + ARG_MAX + MAXSHELLCMDLEN);
+	uma_zfree(exec_map, (void *)args->buf);
 	args->buf = NULL;
 	return (error);
 }
