Re: 64-bit fun with cache.c
Paul Theodoropoulos <[email protected]>
| Newsgroups | gmane.network.djbdns |
|---|---|
| Message-ID | <[email protected]> |
On 1/23/2009 10:24 AM, Mark Johnson wrote: > I'm talking about the hardcoded *limit* for the cachesize. The actual > size is determined at run time and does not grow, but stock djbdns > ships with a limit fixed at compile time as to how big the cache can > be. If you request more than the limit, you get the limit, not what > you asked for. If I remove that hardcoded limit, the cachesize is > still fixed at run time to a static size. caveat: i'm not a programmer, only a 'consumer' of djbware. so, my suggestion may not be considered 'clean' or conformant to 'the djb way'. that said, i think it would be useful if the CACHESIZE and DATALIMIT env values could be represented via abstractions, such as "64M" or "2.5G". why have the fat-finger risk found from adding one too many zeroes? it's also seemed somewhat odd to me that DATALIMIT even exists. per djb, you always set it 3mb larger than CACHESIZE. so, why bother having the env value? wouldn't it be easier if the code figured that out on its own? or are there outlier cases where one might need to set the datalimit higher than 3mb? -- Paul Theodoropoulos