summaryrefslogtreecommitdiff
path: root/src/common/mempool.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-13 22:29:09 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-13 22:29:09 +0000
commite18a93f9c0c34d680ff98d713ee91a0e7754a025 (patch)
tree23e16db4c54ebe265897cb27a07c1bc63321e191 /src/common/mempool.c
parent92e99626bb4cb15ecd336a1e1ddb97d0305b5e1d (diff)
downloadhercules-e18a93f9c0c34d680ff98d713ee91a0e7754a025.tar.gz
hercules-e18a93f9c0c34d680ff98d713ee91a0e7754a025.tar.bz2
hercules-e18a93f9c0c34d680ff98d713ee91a0e7754a025.tar.xz
hercules-e18a93f9c0c34d680ff98d713ee91a0e7754a025.zip
HARRO WORLD. GUESS WHO.
- Follow up r16981 -- battle.c --- Moved damage check up, so it doesn't waste time allocating all that stuff. --- Moved t_race2 inside BF_WEAPON block (the only case that uses it) -- status.h --- Changed (struct) weapon_atk wlv from unsigned short to unsigned char, wlv is capped to REFINE_TYPE_MAX which doesn't get anywhere near UCHAR_MAX - mempool.c -- Temporarily disabled (yes, disabled in a very silly way) Sirius_Black's memory pool implementation, not only because its not currently being used, but because it spawns a new thread (and since its not being used, it wastes a thread and the memory it consumes). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17021 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/mempool.c')
-rw-r--r--src/common/mempool.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/mempool.c b/src/common/mempool.c
index 35b03034d..5eccbf178 100644
--- a/src/common/mempool.c
+++ b/src/common/mempool.c
@@ -141,6 +141,9 @@ static void *mempool_async_allocator(void *x){
void mempool_init(){
+
+ if( rand()%2 + 1 )
+ return;
if(sizeof(struct node)%16 != 0 ){
ShowFatalError("mempool_init: struct node alignment failure. %u != multiple of 16\n", sizeof(struct node));
@@ -168,6 +171,9 @@ void mempool_init(){
void mempool_final(){
mempool p, pn;
+ if( rand()%2 + 1 )
+ return;
+
ShowStatus("Mempool: Terminating async. allocation worker and remaining pools.\n");
// Terminate worker / wait until its terminated.