Date: Mon, 28 May 2001 18:58:14 -0700 From: "David O'Brien" <obrien@freebsd.org> To: freebsd-alpha@freebsd.org Subject: Re: Latest on ' HEADS UP: loader broken' Message-ID: <20010528185813.B22192@dragon.nuxi.com> In-Reply-To: <3B12F29B.A172B51F@newsguy.com>; from dcs@newsguy.com on Mon, May 28, 2001 at 09:51:39PM -0300 References: <Pine.BSF.4.21.0105281727390.20544-100000@beppo.feral.com> <3B12F29B.A172B51F@newsguy.com>
index | next in thread | previous in thread | raw e-mail
On Mon, May 28, 2001 at 09:51:39PM -0300, Daniel C. Sobral wrote:
> Nope. David just tested 0/0 for me. These are the default values, and it
> disables the feature. It crashed. So nothing gets allocated at all,
> because the thing crashes when _assigning_ these values.
Here is the patch that DCS made that allowed me to boot with rev 1.20 of
loader.4th. If you get a chance to test it before he commits it, report
back here. The problem was an alignment issue.
Index: dict.c
===================================================================
RCS file: /home/ncvs/src/sys/boot/ficl/dict.c,v
retrieving revision 1.11
diff -u -p -r1.11 dict.c
--- dict.c 2001/04/29 02:36:33 1.11
+++ dict.c 2001/05/29 01:04:15
@@ -66,8 +66,8 @@
#include "ficl.h"
/* Dictionary on-demand resizing control variables */
-unsigned int dictThreshold;
-unsigned int dictIncrease;
+CELL dictThreshold;
+CELL dictIncrease;
static char *dictCopyName(FICL_DICT *pDict, STRINGINFO si);
@@ -774,11 +774,12 @@ void hashReset(FICL_HASH *pHash)
void dictCheckThreshold(FICL_DICT* dp)
{
- if( dictCellsAvail(dp) < dictThreshold ) {
- dp->dict = ficlMalloc( dictIncrease * sizeof (CELL) );
+ if( dictCellsAvail(dp) < dictThreshold.u ) {
+ dp->dict = ficlMalloc( dictIncrease.u * sizeof (CELL) );
assert(dp->dict);
dp->here = dp->dict;
- dp->size = dictIncrease;
+ dp->size = dictIncrease.u;
+ dictAlign(dp);
}
}
Index: ficl.h
===================================================================
RCS file: /home/ncvs/src/sys/boot/ficl/ficl.h,v
retrieving revision 1.18
diff -u -p -r1.18 ficl.h
--- ficl.h 2001/04/29 02:36:33 1.18
+++ ficl.h 2001/05/29 01:04:17
@@ -1011,8 +1011,8 @@ WORDKIND ficlWordClassify(FICL_WORD *p
/*
** Dictionary on-demand resizing
*/
-extern unsigned int dictThreshold;
-extern unsigned int dictIncrease;
+extern CELL dictThreshold;
+extern CELL dictIncrease;
/*
** Various FreeBSD goodies
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010528185813.B22192>
