Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: >2GB?  (Read 1529 times)

ouroborus

  • Bay Watcher
    • View Profile
>2GB?
« on: August 17, 2010, 08:19:43 am »

Is there a way to permit DF to use more than 2GB on Windows 7 64-bit? I've tried using increaseuserva with no effect.
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: >2GB?
« Reply #1 on: August 17, 2010, 01:02:11 pm »

It's because the DF executable does not have the LARGE_ADDRESS_AWARE header flag.

You could set that flag with the editbin utility (which is part of Microsoft Visual Studio but can be found elsewhere as well), as described here.

But my test crashed immediately upon embarking on a 16x16.
Logged

sweitx

  • Bay Watcher
  • Sun Berry McSunshine
    • View Profile
Re: >2GB?
« Reply #2 on: August 17, 2010, 01:26:42 pm »

It's because the DF executable does not have the LARGE_ADDRESS_AWARE header flag.

You could set that flag with the editbin utility (which is part of Microsoft Visual Studio but can be found elsewhere as well), as described here.

But my test crashed immediately upon embarking on a 16x16.

Hm... wonder why Toady One doesn't allow DF to use more memory?
Logged
One of the toads decided to go for a swim in the moat - presumably because he could path through the moat to my dwarves. He is not charging in, just loitering in the moat.

The toad is having a nice relaxing swim.
The goblin mounted on his back, however, is drowning.

cerapa

  • Bay Watcher
  • It wont bite....unless you are the sun.
    • View Profile
Re: >2GB?
« Reply #3 on: August 17, 2010, 01:55:32 pm »

Hm... wonder why Toady One doesn't allow DF to use more memory?
Because it would become sentient and go skynet.
Logged

Tick, tick, tick the time goes by,
tick, tick, tick the clock blows up.

Eugenitor

  • Bay Watcher
    • View Profile
Re: >2GB?
« Reply #4 on: August 17, 2010, 02:04:33 pm »

LARGE_ADDRESS_AWARE isn't something you can just decide to toss into a program, and risks breaking other things.

What kind of embark are you running that DF needs more than 2GB of memory?
Logged

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: >2GB?
« Reply #5 on: August 17, 2010, 02:30:53 pm »

The main thing I've seen folks wanting DF to use more RAM for is gen'ing large and/or old worlds.
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

Noble Digger

  • Bay Watcher
    • View Profile
Re: >2GB?
« Reply #6 on: August 17, 2010, 05:06:17 pm »

DF used 1.35gb of memory for me on a 5x5 embark at a flat desert. Once I broke into the 2nd cavern level, that number increased to 1.72gb. Guess what happened when I broke into cavern layer 3?

I started a new fortress, that's what.
Logged
quib·ble
1. To evade the truth or importance of an issue by raising trivial distinctions and objections.
2. To find fault or criticize for petty reasons; cavil.

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: >2GB?
« Reply #7 on: August 17, 2010, 05:37:31 pm »

It's because the DF executable does not have the LARGE_ADDRESS_AWARE header flag.

You could set that flag with the editbin utility (which is part of Microsoft Visual Studio but can be found elsewhere as well), as described here.

But my test crashed immediately upon embarking on a 16x16.

Hm... wonder why Toady One doesn't allow DF to use more memory?

1. Toady One does not have more memory.
2. Toady One does not know of that flag (e.g. i am programming for 6 years and did not know about this (and still don't know how to turn this on exactly) till about 1 year before).
3. This is not as simple as it sounds.
4. All of the above.
5. Toady One has other priorities
6. 4 and 5 and 6

P.S. This is just guesswork
Logged

breadbocks

  • Bay Watcher
  • A manacled Mentlegen. (ಠ_ృ)
    • View Profile
Re: >2GB?
« Reply #8 on: August 17, 2010, 05:43:00 pm »

I laughed so hard at 6. Which is really 4, 5, and 6, (which is really 4, 5, and 6).
Logged
Clearly, cakes are the next form of human evolution.

Thief^

  • Bay Watcher
  • Official crazy person
    • View Profile
Re: >2GB?
« Reply #9 on: August 18, 2010, 04:39:18 am »

LARGE_ADDRESS_AWARE isn't something you can just decide to toss into a program, and risks breaking other things.

It should be something you can just enable on any well-made program. The things that break are:
1: Explicit checks that pointers are below the 2GB barrier
2: Hacks to use of the highest bit of pointers for a program's own purposes

Neither of which you should be doing anyway...
Logged
Dwarven blood types are not A, B, AB, O but Ale, Wine, Beer, Rum, Whisky and so forth.
It's not an embark so much as seven dwarves having a simultaneous strange mood and going off to build an artifact fortress that menaces with spikes of awesome and hanging rings of death.

ouroborus

  • Bay Watcher
    • View Profile
Re: >2GB?
« Reply #10 on: August 18, 2010, 08:01:07 am »

LARGE_ADDRESS_AWARE isn't something you can just decide to toss into a program, and risks breaking other things.

It should be something you can just enable on any well-made program. The things that break are:
1: Explicit checks that pointers are below the 2GB barrier
2: Hacks to use of the highest bit of pointers for a program's own purposes

Neither of which you should be doing anyway...

This reasoning also applies to compiling 32-bit software as 64-bit. Any well written 32-bit software can be compiled as 64-bit without issue.

But in reality there's always a set issues that spring up when trying to do something like this. E.g., my experience is that most programmers ignore (or worse, turn off) a lot of the compiler warnings so long as the software just works. (I don't like to ignore them myself, but I'm just weird that way. With gcc, at least, there's a switch that causes warnings to be treated as errors.)
Logged