سؤال

I have read here on how to set the LARGEADDRESSAWARE flag and this is done to my Windows Service. This Windows Service is however hosting a WCF service based on another project and this service is using library's and so on from other projects.

I need the entire application to use the LARGEADDRESSAWARE, is it enouth to set it on the Window Service project(ServiceBase)? Or do I need to set it on all projects?

At this point I can´t switch to 64bits so this will have to do.

هل كانت مفيدة؟

المحلول

It is not an option that's exposed by the IDE, you'll to turn it on by running editbin.exe in a post-build event. This answer shows the commands you need to use.

Do note however that it is fairly likely that you are wasting energy on this. It will only have an effect when the operating system can provide an execution environment that supports "large addresses". That used to be possible many years ago with the /3GB boot option but has stopped being useful a while ago. Also very detrimental on servers, they really need the kernel address space. It is still useful when your server boots a 64-bit version of Windows, any 32-bit code can get a 4 GB address space if they are linked with /LARGEADDRESSAWARE. But if you have such an operating system then changing the project's Target platform to AnyCPU is certainly the much more productive way to take advantage of the much larger address space you get in a 64-bit process. Maybe that doesn't apply in your specific case but is otherwise the best general advice.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top