diff options
author | shennetsind <ind@henn.et> | 2014-01-12 13:27:53 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-01-12 13:27:53 -0200 |
commit | 209d15e07d52a52c110b01f4bad0b52080a69550 (patch) | |
tree | 25323e678f26f09143b7c3c486f5f81ac6379e7f /src/common/db.c | |
parent | 95f13f3420822111f928ba6079fbc2061bd38c5f (diff) | |
download | hercules-209d15e07d52a52c110b01f4bad0b52080a69550.tar.gz hercules-209d15e07d52a52c110b01f4bad0b52080a69550.tar.bz2 hercules-209d15e07d52a52c110b01f4bad0b52080a69550.tar.xz hercules-209d15e07d52a52c110b01f4bad0b52080a69550.zip |
Fixed ERS Cache sharing
Enforcing cache to match the option condition in order for it to be shared. Special Thanks to Haruna!
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/db.c')
-rw-r--r-- | src/common/db.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/db.c b/src/common/db.c index ddfb032d4..8c15c0feb 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -2751,9 +2751,10 @@ void* db_data2ptr(DBData *data) * @see #db_final(void) */ void db_init(void) { - db_iterator_ers = ers_new(sizeof(struct DBIterator_impl),"db.c::db_iterator_ers",ERS_OPT_CLEAN); - db_alloc_ers = ers_new(sizeof(struct DBMap_impl),"db.c::db_alloc_ers",ERS_OPT_CLEAN); + db_iterator_ers = ers_new(sizeof(struct DBIterator_impl),"db.c::db_iterator_ers",ERS_OPT_CLEAN|ERS_OPT_FLEX_CHUNK); + db_alloc_ers = ers_new(sizeof(struct DBMap_impl),"db.c::db_alloc_ers",ERS_OPT_CLEAN|ERS_OPT_FLEX_CHUNK); ers_chunk_size(db_alloc_ers, 50); + ers_chunk_size(db_iterator_ers, 10); DB_COUNTSTAT(db_init); } |