summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2013-01-08 03:27:37 +0000
committergrehan <grehan@FreeBSD.org>2013-01-08 03:27:37 +0000
commit632e659425d1ea61dc536beccfd31c5a52a1a75a (patch)
treec6827721e448991218a25e56caf0637363e65860 /sys/boot/common
parentd6fdadb6d62c9690e47a34a4ae1fd86263e7a52e (diff)
downloadFreeBSD-src-632e659425d1ea61dc536beccfd31c5a52a1a75a.zip
FreeBSD-src-632e659425d1ea61dc536beccfd31c5a52a1a75a.tar.gz
Bring in some userboot changes from the bhyve branch to reduce diffs.
r238966 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. r241180 Clarify comment about default number of FICL dictionary cells. r241153 Allow the number of FICL dictionary cells to be overridden. Loading a 7.3 ISO with userboot/amd64 takes up 10035 cells, overflowing the long-standing default of 10000. Bump userboot's value up to 15000 cells. Reviewed by: dteske (r238966,241180) Obtained from: NetApp
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/interp_forth.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/boot/common/interp_forth.c b/sys/boot/common/interp_forth.c
index b53da43..1c37e2b 100644
--- a/sys/boot/common/interp_forth.c
+++ b/sys/boot/common/interp_forth.c
@@ -51,6 +51,13 @@ extern char bootprog_rev[];
#define BF_PARSE 100
/*
+ * FreeBSD loader default dictionary cells
+ */
+#ifndef BF_DICTSIZE
+#define BF_DICTSIZE 10000
+#endif
+
+/*
* BootForth Interface to Ficl Forth interpreter.
*/
@@ -239,8 +246,8 @@ bf_init(void)
struct bootblk_command **cmdp;
char create_buf[41]; /* 31 characters-long builtins */
int fd;
-
- bf_sys = ficlInitSystem(10000); /* Default dictionary ~4000 cells */
+
+ bf_sys = ficlInitSystem(BF_DICTSIZE);
bf_vm = ficlNewVM(bf_sys);
/* Put all private definitions in a "builtins" vocabulary */
OpenPOWER on IntegriCloud