version 1.76, 1994/01/11 22:35:55 |
version 1.77, 1994/01/13 04:00:09 |
|
|
#endif |
#endif |
|
|
/* |
/* |
* Determine how many buffers to allocate (enough to |
* Determine how many buffers to allocate. We use 10% of the |
* hold 5% of total physical memory, but at least 16). |
* first 2MB of memory, and 5% of the rest, with a minimum of 16 |
* Allocate 1/2 as many swap buffer headers as file i/o buffers. |
* buffers. We allocate 1/2 as many swap buffer headers as file |
|
* i/o buffers. |
*/ |
*/ |
if (bufpages == 0) |
if (bufpages == 0) |
if (physmem < btoc(2 * 1024 * 1024)) |
if (physmem < btoc(2 * 1024 * 1024)) |
bufpages = (physmem / 10) / CLSIZE; |
bufpages = physmem / (10 * CLSIZE); |
else |
else |
bufpages = (physmem / 20) / CLSIZE; |
bufpages = (btoc(2 * 1024 * 1024) + physmem) / |
|
(20 * CLSIZE); |
if (nbuf == 0) { |
if (nbuf == 0) { |
nbuf = bufpages; |
nbuf = bufpages; |
if (nbuf < 16) |
if (nbuf < 16) |