svn commit: r238966 - projects/bhyve/sys/boot/userboot/userboot

Peter Grehan grehan at FreeBSD.org
Wed Aug 1 05:53:21 UTC 2012


Author: grehan
Date: Wed Aug  1 05:53:20 2012
New Revision: 238966
URL: http://svn.freebsd.org/changeset/base/238966

Log:
  Bump up the heap size to 1MB. With a few kernel modules, libstand
  zalloc and userboot seem to want to use ~600KB of heap space, which
  results in a segfault when malloc fails in bhyveload.
  
  Reported by:  sree dot openwrk at gmail dot com

Modified:
  projects/bhyve/sys/boot/userboot/userboot/main.c

Modified: projects/bhyve/sys/boot/userboot/userboot/main.c
==============================================================================
--- projects/bhyve/sys/boot/userboot/userboot/main.c	Wed Aug  1 01:18:36 2012	(r238965)
+++ projects/bhyve/sys/boot/userboot/userboot/main.c	Wed Aug  1 05:53:20 2012	(r238966)
@@ -67,7 +67,7 @@ exit(int v)
 void
 loader_main(struct loader_callbacks_v1 *cb, void *arg, int version, int ndisks)
 {
-	static char malloc[512*1024];
+	static char malloc[1024*1024];
 	int i;
 
         if (version != USERBOOT_VERSION_1)
@@ -82,7 +82,7 @@ loader_main(struct loader_callbacks_v1 *
 	 * alloc() is usable. The stack is buried inside us, so this is
 	 * safe.
 	 */
-	setheap((void *)malloc, (void *)(malloc + 512*1024));
+	setheap((void *)malloc, (void *)(malloc + 1024*1024));
 
         /*
          * Hook up the console


More information about the svn-src-projects mailing list