|
||||
|
![]() |
#1 |
Hall Of Famer
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
|
Major Memory Leak
The game has a major memory leak. In trying to sim a 100 year test league (I used the default MAL league) by the time I got to the 45th year, OOTP was using 1.5 gig of the 2 gigs of ram I have in my machine. As I watched the process through the visual studio debugger, I noticed that the amount of ram just kept creeping up and NEVER went down.
__________________
When is good enough, good enough? |
![]() |
![]() |
#2 | |
All Star Reserve
Join Date: Mar 2002
Location: Monaca, PA
Posts: 828
|
Quote:
I might be wrong, but I don't think it is a memory leak. Close the game down, reboot and then reload your game. You will see that the memory usage will be about the same. I think it is a design decision. I can't see the code, so I can only guess, but it appears as though the game keeps the entire database(or a lot of it) in memory. The pro of that approach is faster access. Reading/Writing to a file is slow. Reading/Writing to memory is fast. The con is just what you are seeing.... a lot of memory. |
|
![]() |
![]() |
#3 | |
Banned
Join Date: Jun 2006
Posts: 241
|
Quote:
|
|
![]() |
![]() |
#4 |
Major Leagues
Join Date: Dec 2001
Posts: 355
|
I, for one, would do it differently. I understand the speed aspect of it, but there has to be a way to segment the database so that only the active players are in the 'in memory' database. The remaining historical information should be relegated to disk.
![]()
__________________
Shawn |
![]() |
![]() |
#5 | |
Hall Of Famer
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
|
Quote:
Besides, think about it. Most people don't have 2 gigs of ram in their machine. If it brings my machine to a halt, what would it do to somone with 512 megs of ram?
__________________
When is good enough, good enough? |
|
![]() |
![]() |
#6 | |
All Star Reserve
Join Date: Mar 2002
Location: Monaca, PA
Posts: 828
|
Quote:
Remember, I didn't write the code, so I could be wrong and I don't want people to think I disagree with the design. It might be the right choice. If I was the programmer Markus is, I would be writing my own game and not commenting on this message board. If you don't have enough memory, it would use your harddrive as memory. Windows calls this a swapfile. That should not be causing crashes. It would just start running slower because accessing the swapfile is slow. |
|
![]() |
![]() |
#7 | |
Hall Of Famer
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
|
Quote:
Its one of the potential causes.
__________________
When is good enough, good enough? |
|
![]() |
![]() |
#8 | |
Hall Of Famer
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
|
Quote:
__________________
When is good enough, good enough? |
|
![]() |
![]() |
#9 |
Global Moderator
Join Date: Sep 2003
Location: NJ
Posts: 5,274
|
Tt 1710
__________________
Thomas A. Montalto Please check out my Stupid Little Blog - http://www.stupidlittleblog.com |
![]() |
![]() |
#10 | |
All Star Reserve
Join Date: Mar 2002
Location: Monaca, PA
Posts: 828
|
Quote:
There probably is a leak. I don't think that is the whole problem. |
|
![]() |
![]() |
#11 | |
Major Leagues
Join Date: Dec 2001
Posts: 355
|
Quote:
__________________
Shawn |
|
![]() |
![]() |
#12 | |
Global Moderator
Join Date: Apr 2003
Location: Rivière-du-Loup, Qc
Posts: 4,615
|
Quote:
According to Duffy, turning off the ticker (which we can do after the patch) will fix the problem that's appearing as a memory leak.
__________________
Free agent baseball fan. Let's go (insert team name here)! |
|
![]() |
![]() |
#13 |
SI Marketing Wizard
Join Date: Mar 2004
Location: Old Street, London
Posts: 4,741
|
Well, no that is one issue
The other factor to take into consideration is the cache. The game is caching your html reports and stuff which could account for the increase in RAM |
![]() |
![]() |
#14 |
Developer OOTP
Join Date: Dec 2001
Location: Germany
Posts: 24,805
|
Keep in mind that the game constantly creates new players that generate history. This will be kept in RAM.
There is a leak if you start, sim, check the memory useage, close the game down, start again, load the same league and then the memory useage is much less than before... if that is the case, we have a leak. |
![]() |
![]() |
#15 | |
Hall Of Famer
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
|
Quote:
__________________
When is good enough, good enough? |
|
![]() |
![]() |
#16 | |
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
Quote:
![]() What we have here, is a cache. Templates and text file content and also other stuff is being cached. When the cache is full or when you close the game, the cache will be written into a file and then the used memory will be freed again as it should be (so it's no leak). When you start the game again, the cache will be empty, so the game will use less RAM. After simulating some games it will be used again and it will need RAM again. So Marc is right, it's just the cache. I've tested it several times for memory leaks, and there are no leaks in the game at the moment ![]() |
|
![]() |
![]() |
#17 | |
Global Moderator
Join Date: Apr 2003
Location: Rivière-du-Loup, Qc
Posts: 4,615
|
Quote:
Now explain why the heck the game runs so much more smoothly in a window than fullscreened! ![]()
__________________
Free agent baseball fan. Let's go (insert team name here)! |
|
![]() |
![]() |
#18 | |
Hall Of Famer
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
|
Quote:
If the program is written to continue to take memory until the system drags to a hault, then yes, its not a memory leak just a memory hog. The result is the same however as system performance degrades over time. The program should run the same in the first 15 min as it does five hours later. This is not the case and I'll be happy to send you the performance logs when I get home if you want to see them. Perhaps a solution to this is to empty the cache every so often, say once a year or every so many games. I'm not sure what exactly your caching or why so I can't propose a solution. The one thing I can say though is it needs to be looked at and I'll do whatever you ask to help resolve it. The way it is right now I can't run a 100 year sim without restarting the game every 20 years or so.
__________________
When is good enough, good enough? |
|
![]() |
![]() |
#19 | |
Hall Of Famer
Join Date: Mar 2002
Location: Hill Country
Posts: 2,428
|
Quote:
__________________
The former GM of the WHBL Managua Four Roses "The best way to find out if you can trust somebody is to trust them." |
|
![]() |
![]() |
#20 | |
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
Quote:
</DIR> |
|
![]() |
![]() |
Bookmarks |
Thread Tools | |
|
|