Changes between Version 1 and Version 2 of Ticket #1650, comment 4


Ignore:
Timestamp:
Nov 7, 2012, 7:16:12 PM (12 years ago)
Author:
wraitii

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1650, comment 4

    v1 v2  
    66Now the GC keeps it at about 7Mb for a while in my testing with one AI. However, "maybeGC()" only actually GCs when the AI reaches about 4/5 of the maximum heap size. Ie about 12.5MB if the size is 16MB, about 23MB if it's 32MB.
    77
    8 Now this would not be an issue, but starting a pathfinder requires 2MB of ram (I tested, it's a little more than 2MB per pathfinder.) If two AIs want to path at the same time, which certainly can happen, then it's about 4.5Mb, and then boom, OOM errors if I have only 16 MB total and only 12MB available.
     8This would normally not be an issue, but starting a pathfinder requires 2MB of ram (I tested, it's a little more than 2MB per pathfinder.) If two AIs want to path at the same time, which certainly can happen, then it's about 4.5Mb, and then boom, OOM errors if I have only 16 MB total and only 12MB available.
    99
    1010So basically, I'll try in the late game, but I still think 16MB won't make it. Sure AIs could call for a GC before starting a pathfinder, which would help, and AIManager could force the G to run if it reaches over 10MB, so there is a bit more free space. But if 7 AIs try to path at the same time, we're getting over the limit whatever happens. And of course, since the AIManager's memory is initialized before knowing how many players there are, this can't be adapted.