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

Peter Jeremy peter at rulingia.com
Wed Oct 3 23:03:47 UTC 2012


On 2012-Oct-03 04:22:39 +0000, Peter Grehan <grehan at FreeBSD.org> wrote:
>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.
...
>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
>+
>+/*

IMHO, the comment here is somewhat confusing since there's no obvious
correlation between "~4000 cells" and "10000" (though I agree that you
just copied the confusion).  Based solely on the comment and associated
#define, the code could be interpreted as "setting BF_DICTSIZE to 10000
provides space for about 4000 cells".  The commit log clarifies that
BF_DICTSIZE is in cells but this is not available to someone reading the
code and doesn't explain the "~4000".

Can I suggest an alternate comment along the lines of:
/*
 * (Maximum?) Dictionary size in cells.  Note that the default FICL dictionary
 * requires ~4000 cells.
 */

-- 
Peter Jeremy


More information about the svn-src-projects mailing list