diff options
author | shennetsind <ind@henn.et> | 2013-12-17 23:02:13 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-12-17 23:02:13 -0200 |
commit | 38f6b2c68c59d3ed2e3fc6d4d75907939c4fdf61 (patch) | |
tree | 45b4bf49bca0ffb5fabe7405f445caa22cc215f8 /src/common/ers.h | |
parent | 46a990697bdacaf3955c54e0b9d8503f3b704728 (diff) | |
download | hercules-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/common/ers.h')
-rw-r--r-- | src/common/ers.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/common/ers.h b/src/common/ers.h index 4ff2a6230..e63711b81 100644 --- a/src/common/ers.h +++ b/src/common/ers.h @@ -71,10 +71,11 @@ #endif /* not ERS_ALIGN_ENTRY */ enum ERSOptions { - ERS_OPT_NONE = 0x0, - ERS_OPT_CLEAR = 0x1,/* silently clears any entries left in the manager upon destruction */ - ERS_OPT_WAIT = 0x2,/* wait for entries to come in order to list! */ - ERS_OPT_FREE_NAME = 0x4,/* name is dynamic memory, and should be freed */ + ERS_OPT_NONE = 0x0, + ERS_OPT_CLEAR = 0x1,/* silently clears any entries left in the manager upon destruction */ + ERS_OPT_WAIT = 0x2,/* wait for entries to come in order to list! */ + ERS_OPT_FREE_NAME = 0x4,/* name is dynamic memory, and should be freed */ + ERS_OPT_CLEAN = 0x8,/* clears used memory upon ers_free so that its all new to be reused on the next alloc */ }; /** |