summaryrefslogtreecommitdiff
path: root/src/map/mapreg_sql.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-12-17 23:02:13 -0200
committershennetsind <ind@henn.et>2013-12-17 23:02:13 -0200
commit38f6b2c68c59d3ed2e3fc6d4d75907939c4fdf61 (patch)
tree45b4bf49bca0ffb5fabe7405f445caa22cc215f8 /src/map/mapreg_sql.c
parent46a990697bdacaf3955c54e0b9d8503f3b704728 (diff)
downloadhercules-38f6b2c68c59d3ed2e3fc6d4d75907939c4fdf61.tar.gz
hercules-38f6b2c68c59d3ed2e3fc6d4d75907939c4fdf61.tar.bz2
hercules-38f6b2c68c59d3ed2e3fc6d4d75907939c4fdf61.tar.xz
hercules-38f6b2c68c59d3ed2e3fc6d4d75907939c4fdf61.zip
Speed up of several procedures that rely on ERS, _mreallocz ('z'ero)
Made Possible Thanks to the Woonderful Haruna! <3 Commit also fixes an inconsistency in the ERS, where it'd start with clear memory but would use garbage upon resizing, also implements a new ERS option that clears entries as soon as pass by ers_free, so that they'll be all shinny for when ers_alloc reuses them. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/mapreg_sql.c')
-rw-r--r--src/map/mapreg_sql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index c94e42d5d..6a13ef2a0 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -291,7 +291,7 @@ void mapreg_final(void) {
void mapreg_init(void) {
mapreg->db = idb_alloc(DB_OPT_BASE);
mapreg->str_db = idb_alloc(DB_OPT_BASE);
- mapreg->ers = ers_new(sizeof(struct mapreg_save), "mapreg_sql.c::mapreg_ers", ERS_OPT_NONE);
+ mapreg->ers = ers_new(sizeof(struct mapreg_save), "mapreg_sql.c::mapreg_ers", ERS_OPT_CLEAN);
mapreg->load();