diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-02-26 05:12:49 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-02-26 05:12:49 +0800 |
commit | 0e55fb49a34b0549d6ec76afc0bd5e4fd9a39196 (patch) | |
tree | db2c9bc6d8512b42e3c0cb3d5ce921cc3b9c6ef8 | |
parent | 4a8851c2a5cb962eb43db0ad0eeb06e82974d6a6 (diff) | |
download | pttbbs-0e55fb49a34b0549d6ec76afc0bd5e4fd9a39196.tar pttbbs-0e55fb49a34b0549d6ec76afc0bd5e4fd9a39196.tar.gz pttbbs-0e55fb49a34b0549d6ec76afc0bd5e4fd9a39196.tar.bz2 pttbbs-0e55fb49a34b0549d6ec76afc0bd5e4fd9a39196.tar.lz pttbbs-0e55fb49a34b0549d6ec76afc0bd5e4fd9a39196.tar.xz pttbbs-0e55fb49a34b0549d6ec76afc0bd5e4fd9a39196.tar.zst pttbbs-0e55fb49a34b0549d6ec76afc0bd5e4fd9a39196.zip |
don't use too much memory for hash slot
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2551 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | include/pttstruct.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h index e0259c40..0223ceee 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -450,7 +450,7 @@ typedef struct keeploc_t { } keeploc_t; #define VALID_USHM_ENTRY(X) ((X) >= 0 && (X) < USHM_SIZE) -#define USHM_SIZE ((MAX_ACTIVE)*4/3) +#define USHM_SIZE ((MAX_ACTIVE)*10/9) /* USHM_SIZE 比 MAX_ACTIVE 大是為了防止檢查人數上限時, 又同時衝進來 * 會造成找 shm 空位的無窮迴圈. * 又, 因 USHM 中用 hash, 空間稍大時效率較好. */ |