View Issue Details
ID | Project | Category | Date Submitted | Last Update | |
---|---|---|---|---|---|
0001409 | AI War 1 / Classic | Gameplay Issue | Nov 16, 2010 2:36 pm | Nov 16, 2010 6:16 pm | |
Reporter | TechSY730 | Assigned To | keith.lamothe | ||
Status | resolved | Resolution | fixed | ||
Product Version | 4.033 | ||||
Summary | 0001409: High Memory Usage | ||||
Description | I know that you intentionally made the game use allocate alot of memory right off the bat so the garbage collector won't run ridiculously often until it sizes the heap right. However, about 900MB right after program startup? Don't you think that is a little much? Is there anything that can reduce this some without incurring overzealous garbage collection? | ||||
Tags | No tags attached. | ||||
Internal Weight | |||||
|
The game is only holding on to _maybe_ 250MB of managed memory after loading an early-middish game (generally less). The "get the gc off our back" allocation is returned to the available pool after the first GC because we null out our references to the allocated chunk. We don't have to hold onto it to convince the GC that it needs to be less aggressive. At least, that's my understanding. Most of the memory footprint is unmanaged memory, which is largely textures, etc. |
|
Ah, art assets, a sworn enemy to RAM everywhere :P Well, its good to know how all the RAM is being stored. I didn't know that large number of objects (not the art and music, just the objects) could take up so much space. Maybe that is why some hardcore real-time programmers shun object-oriented languages. |
|
I wouldn't look on it as a failing of object-oriented languages. Rather, it's a testament to how ridiculously large the game is. There are literally hundreds of millions of object references shortly after starting up a game, and working sets of data on two threads, etc. I'm reasonably confident this is the largest real-time strategy simulation around, by several orders of magnitude. Even on the smaller ship caps and middling-sized maps. There's just nothing else remotely in this scale. |
|
Sorry, I was not trying to imply a failing of object oriented programming; I love the whole OO paradigm. I know AI war is an edge case; what other RTS can claim that having 10,000 units is normal for an small scale early game :D Anyways, I'll stop here, as a bug tracker is not the place for casual discussion. :) |
|
No worries, all good. :) |
|
Heh 900MB is nothing worrying.. strange things start happen only when you near 2GB limit - usually apps crash before reaching it - around 1.7GB or so. |
Date Modified | Username | Field | Change |
---|---|---|---|
Nov 16, 2010 2:36 pm | TechSY730 | New Issue | |
Nov 16, 2010 2:39 pm | keith.lamothe | Note Added: 0003733 | |
Nov 16, 2010 2:40 pm | keith.lamothe | Status | new => resolved |
Nov 16, 2010 2:40 pm | keith.lamothe | Resolution | open => fixed |
Nov 16, 2010 2:40 pm | keith.lamothe | Assigned To | => keith.lamothe |
Nov 16, 2010 2:44 pm | TechSY730 | Note Added: 0003734 | |
Nov 16, 2010 3:00 pm | Chris_McElligottPark | Note Added: 0003736 | |
Nov 16, 2010 3:20 pm | TechSY730 | Note Added: 0003738 | |
Nov 16, 2010 3:25 pm | Chris_McElligottPark | Note Added: 0003740 | |
Nov 16, 2010 6:16 pm | orzelek | Note Added: 0003753 | |
Nov 16, 2010 6:17 pm | orzelek | Note Edited: 0003753 | |
Apr 14, 2014 9:28 am | Chris_McElligottPark | Category | Gameplay - General Complaint => Gameplay Issue |