4

In the PE header there's a flag to indicate whether the binary is LargeAddressAware or not.
The PE header itself exists for both, *.exe and *.dll.

Is it really the case that Windows OS evaluates this flag for the parent executable, only?
Is it completely ignored for all DLL modules?

So why should i enable the LAA linker flag for DLLs if nobody is evaluating it?

I was having the following in mind:
Is there a way to force Windows issue a warning in case a LAA enabled exe loads a module that is not compiled as being LAA?

Also see related question: Drawbacks of using /LARGEADDRESSAWARE for 32 bit Windows executables?

Community
  • 1
  • 1
paulgutten
  • 293
  • 3
  • 11

1 Answers1

4

Is it really the case that Windows OS evaluates this flag for the parent executable, only?

Yes.

Is it completely ignored for all DLL modules?

Yes.

So why should i enable the LAA linker flag for DLLs if nobody is evaluating it?

You should not. It is pointless to do so.

I was having the following in mind: Is there a way to force Windows issue a warning in case a LAA enabled exe loads a module that is not compiled as being LAA?

No there is not.


The thing is the heap is process wide. It is shared by all modules. You cannot have some using a LAA heap and others not. So only the executable gets a chance to make this decision. The flag is in the PE file format which is common for DLL and EXE. But it only has meaning for EXEs.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490