It seems that Orbiter may finally be coming up against the 32-bit address space limit. During a test run I got an allocation failure when setting the surface tile resolution to 128 nodes and the tile LOD bias to max. At this point Orbiter had allocated about 1.7GB.
It's not a problem likely to come up in practice for now (setting both parameters to max leads to unplayable frame rates for me, although I suspect that on the D3D9 client it may be a more realistic proposition).
So maybe ultimately I will need to look into porting Orbiter to 64-bit, but that's not an immediate target (certainly not for the next release). So I was looking at a potential quick fix by setting the /LARGEADDRESSAWARE linker flag.
On 64-bit OS, this flag allows the application to address the full 32-bit (4GB) address space (actually more like 3GB, once the operating system takes its share), rather than 2GB for standard 32-bit executables.
However, the web is full of dire warnings about introducing sporadic, hard-to-pinpoint bugs with this flag. The problem is that pointer arithmetic is more dangerous. You can't use signed integers for representing pointers, so address differences must not be negative, etc. I did a quick test, and didn't encounter any immediate adverse effects after using the flag, but I couldn't guarantee that the Orbiter code is entirely 4GB-safe.
Does anybody have experience with using that flag? Are there any tools to test if code is safe in that respect? I guess the first step is to look into compiler signed/unsigned mismatch warnings (of which there are plenty in Orbiter).
For now, I don't anticipate to set the flag for the Orbiter executable in the next release, but I'll keep playing around with it to get a feeling how stable Orbiter is with it.
It's not a problem likely to come up in practice for now (setting both parameters to max leads to unplayable frame rates for me, although I suspect that on the D3D9 client it may be a more realistic proposition).
So maybe ultimately I will need to look into porting Orbiter to 64-bit, but that's not an immediate target (certainly not for the next release). So I was looking at a potential quick fix by setting the /LARGEADDRESSAWARE linker flag.
On 64-bit OS, this flag allows the application to address the full 32-bit (4GB) address space (actually more like 3GB, once the operating system takes its share), rather than 2GB for standard 32-bit executables.
However, the web is full of dire warnings about introducing sporadic, hard-to-pinpoint bugs with this flag. The problem is that pointer arithmetic is more dangerous. You can't use signed integers for representing pointers, so address differences must not be negative, etc. I did a quick test, and didn't encounter any immediate adverse effects after using the flag, but I couldn't guarantee that the Orbiter code is entirely 4GB-safe.
Does anybody have experience with using that flag? Are there any tools to test if code is safe in that respect? I guess the first step is to look into compiler signed/unsigned mismatch warnings (of which there are plenty in Orbiter).
For now, I don't anticipate to set the flag for the Orbiter executable in the next release, but I'll keep playing around with it to get a feeling how stable Orbiter is with it.