From 38f6b2c68c59d3ed2e3fc6d4d75907939c4fdf61 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 17 Dec 2013 23:02:13 -0200 Subject: 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 --- src/map/mapreg_sql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/mapreg_sql.c') 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(); -- cgit v1.2.3-60-g2f50