summaryrefslogtreecommitdiff
path: root/src/common/ers.h
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-13 08:21:57 -0300
committershennetsind <ind@henn.et>2013-06-13 08:21:57 -0300
commit5e90c5fd3ff133a8f8ba9787d8f83c48840a7a96 (patch)
tree9423ca650d743c936ae0e4f0bce8aae6ff23e696 /src/common/ers.h
parent4b713e7e3eac34339285125d194ae4ff4627fc2a (diff)
downloadhercules-5e90c5fd3ff133a8f8ba9787d8f83c48840a7a96.tar.gz
hercules-5e90c5fd3ff133a8f8ba9787d8f83c48840a7a96.tar.bz2
hercules-5e90c5fd3ff133a8f8ba9787d8f83c48840a7a96.tar.xz
hercules-5e90c5fd3ff133a8f8ba9787d8f83c48840a7a96.zip
Memory Slasher [2] !!" - 17MB Down!
Hercules is now even slimmer. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/ers.h')
-rw-r--r--src/common/ers.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/ers.h b/src/common/ers.h
index 4871d8d50..51701d778 100644
--- a/src/common/ers.h
+++ b/src/common/ers.h
@@ -119,6 +119,8 @@ typedef struct eri {
*/
void (*destroy)(struct eri *self);
+ /* */
+ void (*chunk_size) (struct eri *self, unsigned int new_size);
} *ERS;
#ifdef DISABLE_ERS
@@ -127,6 +129,7 @@ typedef struct eri {
# define ers_free(obj,entry) aFree(entry)
# define ers_entry_size(obj) (size_t)0
# define ers_destroy(obj)
+# define ers_chunk_size(obj,size)
// Disable the public functions
# define ers_new(size,name,options) NULL
# define ers_report()
@@ -138,6 +141,7 @@ typedef struct eri {
# define ers_free(obj,entry) (obj)->free((obj),(entry))
# define ers_entry_size(obj) (obj)->entry_size(obj)
# define ers_destroy(obj) (obj)->destroy(obj)
+# define ers_chunk_size(obj,size) (obj)->chunk_size(obj,size)
/**
* Get a new instance of the manager that handles the specified entry size.
@@ -154,7 +158,7 @@ ERS ers_new(uint32 size, char *name, enum ERSOptions options);
/**
* Print a report about the current state of the Entry Reusage System.
* Shows information about the global system and each entry manager.
- * The number of entries are checked and a warning is shown if extra reusable
+ * The number of entries are checked and a warning is shown if extra reusable
* entries are found.
* The extra entries are included in the count of reusable entries.
*/