Author: devurandom
Date: Sun Mar 8 12:45:08 2009
New Revision: 6807
URL: http://svn.gna.org/viewcvs/warzone?rev=6807&view=rev
Log:
Effect memory pool cleanup
I played a bit with implementing a better memory pool for effects and this
is what came out.
Major changes:
Allocates in chunks of 10k effects, uses free/used lists to speed up search
for free and updates of active effects.
Benefits:
* Unlimited number of effects possible.
* Faster
Not (yet) benchmarked, but logic dictates that iterating over MAX_EFFECTS
is slower than iterating over just the number of active effects.
(Patch as posted to mailinglist.)
Modified:
trunk/src/effects.c
trunk/src/effects.h
_______________________________________________
Warzone-commits mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-commits