Commit Graph

7 Commits

Author SHA1 Message Date
wagic.jeck 1ba7f108b0 Jeck - Cache is using map<> again. The implementation is cleaner and seems a little faster. 2009-09-19 23:20:43 +00:00
wagic.jeck 0d3686e65a Jeck - Cache fix, booster duplicate fix.
* Restored OptionItem saving fix.
 * Booster duplicate replacement was picking random cards from the wrong set. My fault, but I've fixed it :)
 * The problem with cache had nothing to do with memory fragmentation, but I've switched to an array rather than map<> just in case. The actual issue was that in GameStateDeckViewer, I'd given the cache unlimited space, thinking that AttemptNew would recover from any bad_allocs. Unfortunately, the image loading routines and similar stuff called by various implementations of WResource::Attempt() could fail halfway through, leaking memory. 

The temporary solution is to set a proper limit (8000000 px, more or less) and (in case we still run out of memory) test to make certain CACHE_SPACE_RESERVED can be malloc'd/free'd. The proper solution would be to keep byte-perfect records of memory used (right now we're kinda fuzzy-- we track pixels per image and bytes per sound, but not the space for jquads or other incidentals) instead of testing a malloc, and potentially cleaning up all calls inside of Attempt() so they fail without leaks. That's what I'm working on now.

Still, it's nice to have identified the problem. This version of the cache should be fully functional, it's just a bit inelegant.
2009-09-19 21:11:35 +00:00
wagic.jeck 8ba34dafca Jeck - WResourceManager / Cache should now be leak free. Demo mode still crashes around EnstackBlocker. 2009-09-18 01:20:46 +00:00
wagic.the.homebrew@gmail.com c80245b3e8 Erwan - daily build template.exe 2009-09-14 14:09:01 +00:00
wagic.jeck ce31194358 Jeck - Daily build recompile as release version. Is this or the debug version preferred? 2009-09-14 09:10:54 +00:00
wagic.the.homebrew@gmail.com a696b65ffb Erwan
- fix compilation issues
2009-09-13 12:52:24 +00:00
wagic.the.homebrew@gmail.com 40f2fab205 Erwan
- Reverted Rockslide Elemental to fix test issue
- Removed old gatherer scripts
- Added "daily_build" directory for people who can't compile
2009-09-12 06:44:36 +00:00