|
From: Andre R. <and...@us...> - 2004-11-20 19:18:59
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3982/Common/source Modified Files: Tag: New_Tables_Experiment-branch langhash.c Log Message: In hashflushcache, keep updating ctbytesneeded when disposing cached hash nodes and hash bucket arrays. In hashlinknode, always double the size of the hash bucket array when neccessary -- quadrupling may be too much. Index: langhash.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langhash.c,v retrieving revision 1.4.2.12 retrieving revision 1.4.2.13 diff -C2 -d -r1.4.2.12 -r1.4.2.13 *** langhash.c 16 Nov 2004 23:48:39 -0000 1.4.2.12 --- langhash.c 20 Nov 2004 19:18:35 -0000 1.4.2.13 *************** *** 1008,1011 **** --- 1008,1013 ---- hfreenodes [k] = (**hn).hashlink; + + *ctbytesneeded -= gethandlesize ((Handle) hn); disposehandle ((Handle) hn); *************** *** 1023,1026 **** --- 1025,1030 ---- hfreebuckets [j] = (hdlhashbucketarray) (*hb)[0]; + + *ctbytesneeded -= gethandlesize ((Handle) hb); disposehandle ((Handle) hb); *************** *** 1537,1541 **** #ifdef flv10tables ! if (3 * (**htable).ctnodes > 2 * (1 << (**htable).logsize)) { /*more than 2/3rds full, grow it*/ --- 1541,1547 ---- #ifdef flv10tables ! //if ((**htable).ctnodes > (1 << (**htable).logsize)) ! if (3 * (**htable).ctnodes > 2 * (1 << (**htable).logsize)) ! { /*more than 2/3rds full, grow it*/ *************** *** 1545,1551 **** oldlogsize = (**htable).logsize; ! if (oldlogsize < 14) ! newlogsize = oldlogsize + 2; /*quadruple for 8k items or less*/ ! else newlogsize = oldlogsize + 1; /*double for 16k items or more*/ --- 1551,1557 ---- oldlogsize = (**htable).logsize; ! //if (oldlogsize < 14) ! // newlogsize = oldlogsize + 2; /*quadruple for 8k items or less*/ ! //else newlogsize = oldlogsize + 1; /*double for 16k items or more*/ |