diff options
author | shennetsind <notind@gmail.com> | 2013-05-17 11:08:38 -0700 |
---|---|---|
committer | shennetsind <notind@gmail.com> | 2013-05-17 11:08:38 -0700 |
commit | 080f7a22740225df70a488849587b462a5d6b1a3 (patch) | |
tree | 0c1dc751af9f06e1ce3729d271de301f78a4e611 /src/common/ers.c | |
parent | 754af15505f32237f8063e51ae9a1cb90788dff4 (diff) | |
parent | 25e848f1a0f9317d63106cae048a1ef838411cb2 (diff) | |
download | hercules-080f7a22740225df70a488849587b462a5d6b1a3.tar.gz hercules-080f7a22740225df70a488849587b462a5d6b1a3.tar.bz2 hercules-080f7a22740225df70a488849587b462a5d6b1a3.tar.xz hercules-080f7a22740225df70a488849587b462a5d6b1a3.zip |
Merge pull request #1 from Earisu/master
updating, with earisu's
Diffstat (limited to 'src/common/ers.c')
-rw-r--r-- | src/common/ers.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/common/ers.c b/src/common/ers.c index b94b0888d..13e54b393 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -1,7 +1,7 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams /*****************************************************************************\ - * Copyright (c) Athena Dev Teams - Licensed under GNU GPL * - * For more information, see LICENCE in the main folder * - * * * <H1>Entry Reusage System</H1> * * * * There are several root entry managers, each with a different entry size. * @@ -48,8 +48,7 @@ #ifndef DISABLE_ERS -#define ERS_ROOT_SIZE 256 -#define ERS_BLOCK_ENTRIES 4096 +#define ERS_BLOCK_ENTRIES 2048 struct ers_list { @@ -278,7 +277,16 @@ ERS ers_new(uint32 size, char *name, enum ERSOptions options) void ers_report(void) { - // FIXME: Someone use this? Is it really needed? + ers_cache_t *cache; + int i = 0; + for (cache = CacheList; cache; cache = cache->Next) { + ShowMessage(CL_BOLD"[Entry manager #%u report]\n"CL_NORMAL, ++i); + ShowMessage("\tinstances : %u\n", cache->ReferenceCount); + ShowMessage("\tblock array size : %u\n", cache->ObjectSize); + ShowMessage("\tallocated blocks : %u\n", cache->Free+cache->Used); + ShowMessage("\tentries being used : %u\n", cache->Used); + ShowMessage("\tunused entries : %u\n", cache->Free); + } } void ers_force_destroy_all(void) |