diff options
| author | Andriy Gapon <avg@FreeBSD.org> | 2010-04-12 21:13:03 +0000 |
|---|---|---|
| committer | Andriy Gapon <avg@FreeBSD.org> | 2010-04-12 21:13:03 +0000 |
| commit | 8b0482d98fc04b697d39346a47168d70b412cc9b (patch) | |
| tree | 3c5272c398d0243655f6419854f1f03be2696dde /lib/libc | |
| parent | 6075b76ed7605694a1bd4c1e79860ae5d68fd331 (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/db/hash/hash.c | 2 | ||||
| -rw-r--r-- | lib/libc/db/hash/hash.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c index 6b71d4a7c30f..02a9c5849a44 100644 --- a/lib/libc/db/hash/hash.c +++ b/lib/libc/db/hash/hash.c @@ -309,6 +309,8 @@ init_hash(hashp, file, info) if (stat(file, &statbuf)) return (NULL); hashp->BSIZE = statbuf.st_blksize; + if (hashp->BSIZE > MAX_BSIZE) + hashp->BSIZE = MAX_BSIZE; hashp->BSHIFT = __log2(hashp->BSIZE); } diff --git a/lib/libc/db/hash/hash.h b/lib/libc/db/hash/hash.h index 66f86aa3d72c..70cca5b694df 100644 --- a/lib/libc/db/hash/hash.h +++ b/lib/libc/db/hash/hash.h @@ -118,7 +118,7 @@ typedef struct htab { /* Memory resident data structure */ /* * Constants */ -#define MAX_BSIZE 65536 /* 2^16 */ +#define MAX_BSIZE 32768 /* 2^15 but should be 65536 */ #define MIN_BUFFERS 6 #define MINHDRSIZE 512 #define DEF_BUFSIZE 65536 /* 64 K */ |
