|
Written by AHWULF
|
|
Wednesday, 24 November 2010 11:45 |
|
AHWULF addresses an issue that is affecting a few players that he and MARTINI are trying to solve: "This ctd bug has got to stop!It is inconceivable to me that with 9GB of RAM on Win7/64 and 1892MB on the nvidia card, I could hit out of memory absent a severe memory leak in the game itself given that nothing else was running other than Chrome."
AHWULF: Over the past 10 years the game has seen many upgrades in features. It has also grown in memory usage, partly because of the new features and partly due to the original design of the game which never anticipated so much new material.
Currently on the PC the client is experiencing a lot of this error: C++ Exception: class std::runtime_error 'Out of memory' at address 758FB727
This is the primary cause of a large percentage of CTD's on the PC version.
The reason is that 32bit apps on Windows (any version) are limited to 2GB of virtual addresses, which translates into 1.7GB (more or less) of actual usable memory per process. When you hit the '2GB' limit (again at around 1.7GB) the OS tells the app 'sorry charlie no memory'. Right now the client uses a max of about 1.3GB of client data, and OpenGL further backs up all the textures in the application memory of around 400MB. Thus depending on what you do, what you are, what driver you have, etc. you may hit the limit a lot or just miss it.
There are alternate ways to get Windows to provide more memory for 32bit apps. One is PAE which allows more than 4GB of memory to be addressed, but drivers and applications may become unstable and the application is still stuck with 2GB; the other is the /3GB option which squeezes Windows into half of its normal 2GB space but also causes instabilities particularly with drivers.
Note also that the client does not have a memory leak that is causing the out of memory to occur, it is the result of living too close to the limit of memory.
The only proper solution is to slim the client down by about 150MB. There is no one easy fix to do this but we are identifying ways to not load everything up front, removing unused data, and even considering things like compressing parts of the data when not used.
The game has always tried to load as much up front as possible to avoid stutters later on. Now that we have reached the limit this will have to be pruned some. We can't do this kind of thing without being careful and testing the changes. Just think of it as pouring Slim Fast into the code. You can't lose weight all in one gulp. For example, today Martini made one change that removed 16MB of unused data.
Right now the easiest current solution is to turn on the 'Low Memory' option in preferences; at the expense of occasional stutters you won't use enough memory to ever hit the limit. |
Is there a plan to allow the client to grow past 1.7G, to allow more development?