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

Comparing ray/src/hd/holofile.c (file contents):
Revision 3.30 by gwlarson, Thu Dec 10 10:45:02 1998 UTC vs.
Revision 3.31 by gwlarson, Wed Dec 30 11:30:04 1998 UTC

# Line 21 | Line 21 | static char SCCSid[] = "$SunId$ SGI";
21   #ifndef PCTFREE
22   #define PCTFREE         15      /* maximum fraction to free (%) */
23   #endif
24 < #ifndef MAXFRAG
25 < #define MAXFRAG         8191    /* maximum fragments/file to track (0==inf) */
24 > #ifndef MAXFRAGB
25 > #define MAXFRAGB        16      /* fragment blocks/file to track (0==inf) */
26   #endif
27   #ifndef MINDIRSEL
28                                  /* minimum directory seek length */
# Line 34 | Line 34 | static char SCCSid[] = "$SunId$ SGI";
34   #define read    readbuf
35   #endif
36  
37 < #define FRAGBLK         256     /* number of fragments to allocate at a time */
37 > #define FRAGBLK         512     /* number of fragments to allocate at a time */
38  
39   unsigned        hdcachesize = CACHESIZE*1024*1024;      /* target cache size */
40   unsigned long   hdclock;        /* clock value */
# Line 501 | Line 501 | register BEAMI *bi;
501                  f->nfrags = j;
502          }
503          j = f->nfrags++;                /* allocate a slot in free list */
504 < #if MAXFRAG
505 <        if (j >= MAXFRAG-1)
506 <                f->nfrags--;
504 > #if MAXFRAGB
505 >        if (j >= MAXFRAGB*FRAGBLK) {
506 >                f->nfrags = j--;        /* stop list growth */
507 >                if (bi->nrd <= f->fi[j].nrd)
508 >                        return;         /* new one no better than discard */
509 >        }
510   #endif
511          if (j % FRAGBLK == 0) {         /* more free list space */
512                  register BEAMI  *newp;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines