svn commit: r241153 - in projects/bhyve/sys/boot: common userboot/userboot

Peter Grehan grehan at FreeBSD.org
Wed Oct 3 04:22:40 UTC 2012


Author: grehan
Date: Wed Oct  3 04:22:39 2012
New Revision: 241153
URL: http://svn.freebsd.org/changeset/base/241153

Log:
  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.

Modified:
  projects/bhyve/sys/boot/common/interp_forth.c
  projects/bhyve/sys/boot/userboot/userboot/Makefile

Modified: projects/bhyve/sys/boot/common/interp_forth.c
==============================================================================
--- projects/bhyve/sys/boot/common/interp_forth.c	Wed Oct  3 03:44:23 2012	(r241152)
+++ projects/bhyve/sys/boot/common/interp_forth.c	Wed Oct  3 04:22:39 2012	(r241153)
@@ -51,6 +51,13 @@ extern char bootprog_rev[];
 #define BF_PARSE 100
 
 /*
+ * Default dictionary size, ~4000 cells
+ */
+#ifndef BF_DICTSIZE
+#define BF_DICTSIZE	10000
+#endif
+
+/*
  * BootForth   Interface to Ficl Forth interpreter.
  */
 
@@ -234,7 +241,7 @@ bf_init(void)
     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 */

Modified: projects/bhyve/sys/boot/userboot/userboot/Makefile
==============================================================================
--- projects/bhyve/sys/boot/userboot/userboot/Makefile	Wed Oct  3 03:44:23 2012	(r241152)
+++ projects/bhyve/sys/boot/userboot/userboot/Makefile	Wed Oct  3 04:22:39 2012	(r241153)
@@ -46,6 +46,7 @@ CLEANFILES=	vers.c
 .if ${MK_FORTH} != "no"
 BOOT_FORTH=	yes
 CFLAGS+=        -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386
+CFLAGS+=	-DBF_DICTSIZE=15000
 LIBFICL=	${.OBJDIR}/../ficl/libficl.a
 LIBSTAND=	${.OBJDIR}/../libstand/libstand.a
 .endif


More information about the svn-src-projects mailing list