| 18 |
|
|
| 19 |
|
#ifndef CACHESIZE |
| 20 |
|
#ifdef SMLMEM |
| 21 |
< |
#define CACHESIZE 5 |
| 21 |
> |
#define CACHESIZE 10 |
| 22 |
|
#else |
| 23 |
< |
#define CACHESIZE 17 /* default cache size (Mbytes, 0==inf) */ |
| 23 |
> |
#define CACHESIZE 100 /* default cache size (Mbytes, 0==inf) */ |
| 24 |
|
#endif |
| 25 |
|
#endif |
| 26 |
|
#ifndef FREEBEAMS |
| 30 |
|
#define PCTFREE 15 /* maximum fraction to free (%) */ |
| 31 |
|
#endif |
| 32 |
|
#ifndef MAXFRAGB |
| 33 |
< |
#define MAXFRAGB 16 /* fragment blocks/file to track (0==inf) */ |
| 33 |
> |
#define MAXFRAGB 64 /* fragment blocks/file to track (0==inf) */ |
| 34 |
|
#endif |
| 35 |
|
#ifndef FF_DEFAULT |
| 36 |
|
/* when to free a beam fragment */ |
| 407 |
|
) |
| 408 |
|
{ |
| 409 |
|
off_t total = 0; |
| 410 |
< |
register int i, j; |
| 410 |
> |
register int j; |
| 411 |
|
|
| 412 |
|
for (j = 0; hdlist[j] != NULL; j++) { |
| 413 |
|
if (hdlist[j]->fd != fd) |
| 414 |
|
continue; |
| 415 |
|
total += biglob(hdlist[j])->nrd * sizeof(RAYVAL); |
| 416 |
< |
i = nbeams(hdlist[j]); |
| 417 |
< |
total += i*sizeof(BEAMI) + sizeof(HDGRID); |
| 418 |
< |
for ( ; i > 0; i--) |
| 416 |
> |
total += nbeams(hdlist[j])*sizeof(BEAMI) + sizeof(HDGRID); |
| 417 |
> |
#if 0 |
| 418 |
> |
for (i = nbeams(hdlist[j]); i > 0; i--) |
| 419 |
|
if (hdlist[j]->bl[i] != NULL) |
| 420 |
|
total += sizeof(RAYVAL) * |
| 421 |
|
(hdlist[j]->bl[i]->nrm - |
| 422 |
|
hdlist[j]->bi[i].nrd); |
| 423 |
+ |
#endif |
| 424 |
|
} |
| 425 |
< |
return(total); /* does not include fragments */ |
| 425 |
> |
return(total); /* doesn't include fragments, unflushed rays */ |
| 426 |
|
} |
| 427 |
|
|
| 428 |
|
|