Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Oct 2012 08:50:11 +1000
From:      Peter Jeremy <peter@rulingia.com>
To:        Peter Grehan <grehan@FreeBSD.org>
Cc:        svn-src-projects@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r241153 - in projects/bhyve/sys/boot: common userboot/userboot
Message-ID:  <20121003225011.GA61464@vps.rulingia.com>
In-Reply-To: <201210030422.q934Mdt0060521@svn.freebsd.org>
References:  <201210030422.q934Mdt0060521@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2012-Oct-03 04:22:39 +0000, Peter Grehan <grehan@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



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