Prev Previous Post   Next Post Next
Starfleet Veteran
Join Date: Jun 2012
Posts: 1
I'm unsure how to reach a STO developer or someone in charge of its build chain, so I'll just post this here and hope someone at PW/Cryptic finds it.

I'm using a 64-bit edition of Windows, and I have 4GB of ram. STO is never claiming more than 2GB of memory even though there is nearly one free gigabyte of it. Given the load delays I guess the game could use the free gigabyte to keep more stuff in memory, and avoid having to reload stuff from disk all the time.

Having had the same type of issue on other 32-bit memory hungry games, I looked if the game was linked with the proper option (ie: the one which sets the IMAGE_FILE_LARGE_ADDRESS_AWARE flag on the executable image).

It's not there, so either PW/Cryptic isn't aware the option exists, or the STO code can't handle signed pointers properly. If the latter is false, as it is with most recent programs, enabling that option on the linker would safely allow people running 64-bit windows to give STO at most 4GB of application address space, which is twice what it currently can use on such systems, assuming there is enough free memory available.

To see if the option is active you need a tool which can inspect the linker flags of an executable. I use DUMPBIN which is included with Microsoft's Visual Studio Express. Example on a program which was linked with the proper option (Civilization V):

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>dumpbin /HEADERS "C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v\CivilizationV.
Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.

Dump of file C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v\CivilizationV.exe

PE signature found


14C machine (x86)
8 number of sections
4EE9BEC8 time date stamp Thu Dec 15 10:32:56 2011
0 file pointer to symbol table
0 number of symbols
E0 size of optional header
123 characteristics
Relocations stripped
Application can handle large (>2GB) addresses
32 bit word machine
For STO the line "Application can handle large (>2GB) addresses" doesn't show up, so the flag hasn't been set.

To change this you can either set an option on your linker, or use another tool from VSE after the program is completely built:
This won't work from my end since the game auto-patcher restores the executable to it's previous 2GB-limited self before starting the game. I've of course only tried it on the testing shard (Tribble) in case anything happened.

That technique works nicely for many games, so I hope you'll be able to add the flag either to your linker, or add that tool somewhere in your build chain to release executables which can take advantage of more of the memory we have installed.

I don't know what brand of compiler/linker you use, but since this is only a flag in the PE header any linker should support it.

MSDN, PE Header spec:
The old new thing:
Some other game describing the same tip:

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

All times are GMT -7. The time now is 10:44 AM.