summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-05-08 14:27:20 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-05-08 14:27:20 +0000
commit702ba5ecad8d2c9df034727253b94098fb09e711 (patch)
treecb373a9f1a974b18330307221aa5c72741604cc9 /src
parent08d1f29173d43744e37bcbd4259777096e2398f2 (diff)
- Tweaked various mempool chunk sizes
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@1965 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'src')
-rw-r--r--src/conf.c3
-rw-r--r--src/hash.c8
2 files changed, 3 insertions, 8 deletions
diff --git a/src/conf.c b/src/conf.c
index b7f6eef..378cb9a 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -432,8 +432,7 @@ attach_iline(struct Client *client_p, struct MaskItem *conf)
void
init_ip_hash_table(void)
{
- ip_entry_pool = mp_pool_new(sizeof(struct ip_entry),
- 2 * hard_fdlimit);
+ ip_entry_pool = mp_pool_new(sizeof(struct ip_entry), MP_CHUNK_SIZE_IP_ENTRY);
memset(ip_hash_table, 0, sizeof(ip_hash_table));
}
diff --git a/src/hash.c b/src/hash.c
index 4dad3c7..206d593 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -69,12 +69,8 @@ static struct UserHost *userhostTable[HASHSIZE];
void
hash_init(void)
{
- /* Default the userhost/namehost sizes to CLIENT_HEAP_SIZE for now,
- * should be a good close approximation anyway
- * - Dianora
- */
- userhost_pool = mp_pool_new(sizeof(struct UserHost), MP_CHUNK_SIZE_CLIENT);
- namehost_pool = mp_pool_new(sizeof(struct NameHost), MP_CHUNK_SIZE_CLIENT);
+ userhost_pool = mp_pool_new(sizeof(struct UserHost), MP_CHUNK_SIZE_USERHOST);
+ namehost_pool = mp_pool_new(sizeof(struct NameHost), MP_CHUNK_SIZE_NAMEHOST);
hashf_xor_key = genrand_int32() % 256; /* better than nothing --adx */
}