Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Aug 2012 05:53:21 +0000 (UTC)
From:      Peter Grehan <grehan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r238966 - projects/bhyve/sys/boot/userboot/userboot
Message-ID:  <201208010553.q715rLAd016031@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208010553.q715rLAd016031>