ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rholo.c
(Generate patch)

Comparing ray/src/hd/rholo.c (file contents):
Revision 3.66 by greg, Thu Sep 9 00:25:59 2004 UTC vs.
Revision 3.68 by greg, Thu Sep 9 01:41:21 2004 UTC

# Line 320 | Line 320 | memerr:
320   static int
321   rholo(void)                             /* holodeck main loop */
322   {
323 <        static long     nextfragwarn = 100*(1L<<20);
323 >        static long     nextfragwarn = 100L<<20;
324          static int      idle = 0;
325          PACKET  *pl = NULL, *plend;
326          off_t   fsiz;
# Line 344 | Line 344 | rholo(void)                            /* holodeck main loop */
344                  return(1);      /* comes back */
345          }
346   #if FRAGWARN
347 <        if (fsiz >= nextfragwarn &&
348 <                    (fsiz-hdfiluse(hdlist[0]->fd,0))/(fsiz/100) > FRAGWARN) {
349 <                double  pctfrag = 100.*(fsiz-hdfiluse(hdlist[0]->fd,1))/fsiz;
350 <                if (pctfrag >= (double)FRAGWARN) {
347 >        if (fsiz >= nextfragwarn) {
348 >                double  pctfrag = 100.*(fsiz-hdfiluse(hdlist[0]->fd))/fsiz;
349 >                if (pctfrag >= (double)FRAGWARN) {
350                          sprintf(errmsg, "holodeck file fragmentation is %.0f%%",
351                                          pctfrag);
352                          error(WARNING, errmsg);
353                          nextfragwarn = fsiz + (fsiz>>2);
354 <                }
354 >                } else
355 >                        nextfragwarn = fsiz + (10L<<20);
356          }
357   #endif
358          t = time(NULL);                 /* check time */
# Line 662 | Line 662 | int    ec;
662                  if ((ncprocs > 0) & (force >= 0) && vdef(REPORT)) {
663                          off_t   fsiz, fuse;
664                          fsiz = hdfilen(hdlist[0]->fd);
665 <                        fuse = hdfiluse(hdlist[0]->fd, 1);
665 >                        fuse = hdfiluse(hdlist[0]->fd);
666                          fprintf(stderr,
667                          "%s: %.1f Mbyte holodeck file, %.1f%% fragmentation\n",
668                                          hdkfile, fsiz/(1024.*1024.),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines