--- ray/src/hd/holofile.c 2004/09/09 01:06:19 3.56 +++ ray/src/hd/holofile.c 2008/12/04 23:34:00 3.58 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: holofile.c,v 3.56 2004/09/09 01:06:19 greg Exp $"; +static const char RCSid[] = "$Id: holofile.c,v 3.58 2008/12/04 23:34:00 greg Exp $"; #endif /* * Routines for managing holodeck files @@ -18,9 +18,9 @@ static const char RCSid[] = "$Id: holofile.c,v 3.56 20 #ifndef CACHESIZE #ifdef SMLMEM -#define CACHESIZE 5 +#define CACHESIZE 10 #else -#define CACHESIZE 17 /* default cache size (Mbytes, 0==inf) */ +#define CACHESIZE 100 /* default cache size (Mbytes, 0==inf) */ #endif #endif #ifndef FREEBEAMS @@ -30,7 +30,7 @@ static const char RCSid[] = "$Id: holofile.c,v 3.56 20 #define PCTFREE 15 /* maximum fraction to free (%) */ #endif #ifndef MAXFRAGB -#define MAXFRAGB 16 /* fragment blocks/file to track (0==inf) */ +#define MAXFRAGB 64 /* fragment blocks/file to track (0==inf) */ #endif #ifndef FF_DEFAULT /* when to free a beam fragment */ @@ -407,21 +407,22 @@ hdfiluse( /* compute file usage (in bytes) */ ) { off_t total = 0; - register int i, j; + register int j; for (j = 0; hdlist[j] != NULL; j++) { if (hdlist[j]->fd != fd) continue; total += biglob(hdlist[j])->nrd * sizeof(RAYVAL); - i = nbeams(hdlist[j]); - total += i*sizeof(BEAMI) + sizeof(HDGRID); - for ( ; i > 0; i--) + total += nbeams(hdlist[j])*sizeof(BEAMI) + sizeof(HDGRID); +#if 0 + for (i = nbeams(hdlist[j]); i > 0; i--) if (hdlist[j]->bl[i] != NULL) total += sizeof(RAYVAL) * (hdlist[j]->bl[i]->nrm - hdlist[j]->bi[i].nrd); +#endif } - return(total); /* does not include fragments */ + return(total); /* doesn't include fragments, unflushed rays */ }