From e18a93f9c0c34d680ff98d713ee91a0e7754a025 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 13 Dec 2012 22:29:09 +0000 Subject: 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 --- src/common/mempool.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/common/mempool.c') 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. -- cgit v1.2.3-70-g09d2