From 5e90c5fd3ff133a8f8ba9787d8f83c48840a7a96 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 13 Jun 2013 08:21:57 -0300 Subject: Memory Slasher [2] !!" - 17MB Down! Hercules is now even slimmer. Signed-off-by: shennetsind --- src/common/ers.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/common/ers.h') 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. */ -- cgit v1.2.3-70-g09d2