2GB Memory Limit

41 views
Skip to first unread message

Larry Rix

unread,
Jun 11, 2018, 10:27:00 AM6/11/18
to Eiffel Users
Is Eiffel subject to a 2GB memory limit? If so, is there a way around it? Is it Eiffel that is limited or is it something else?

Hubert Cater

unread,
Jun 11, 2018, 11:29:24 AM6/11/18
to Eiffel Users
Hi Larry,

I discovered a problem with my compiled 32 bit EXEs running on a Windows 64 OS, in that apparently by default, a 32Bit application can only use 2GB of memory.  I was able to work around this by setting the LARGEADDRESSAWARE flag for my EXE and that allowed it to go above the 2 GB memory limit.

I used the Microsoft Visual Studio 'editbin' tool to set this flag on the EXE after compilation.


What would be great, is if I was able to apply this flag to a 'frozen' EXE so that I could have it also applied when testing in Workbench mode.  I'm sure this could be done but I haven't actually investigated how to do this.  I'm guessing a simple way to implement a C compilcation flag in Eiffelstudio?

A workaround could be to apply it to the frozen EXE itself but then you'd have to do this everytime you re-freeze your code.

Not sure if this relates to your issue, but I thought I'd throw it out there just in case,
Hubert


On Mon, Jun 11, 2018 at 10:27 AM, Larry Rix <lar...@moonshotsoftware.com> wrote:
Is Eiffel subject to a 2GB memory limit? If so, is there a way around it? Is it Eiffel that is limited or is it something else?

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/eiffel-users.
For more options, visit https://groups.google.com/d/optout.

Anders Persson

unread,
Jun 11, 2018, 4:17:31 PM6/11/18
to Eiffel Users
If you compile to 32 bit it is probably the adressable memory that is the limitation.

Den mån 11 juni 2018 16:27Larry Rix <lar...@moonshotsoftware.com> skrev:
Is Eiffel subject to a 2GB memory limit? If so, is there a way around it? Is it Eiffel that is limited or is it something else?

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.

Emmanuel Stapf

unread,
Jun 11, 2018, 11:07:14 PM6/11/18
to eiffel...@googlegroups.com

It is easy to pass the linker flag “/LARGEADDRESSAWARE” to allow the 3GB memory addressing. Go to the project settings and under Advanced->Externals choose `Add linker flag` and enter the above flag. However, 32-bit Windows are pretty rare those days and it is recommended to compile in 64-bit mode instead.

 

Manu

 

From: eiffel...@googlegroups.com <eiffel...@googlegroups.com> On Behalf Of Hubert Cater
Sent: Monday, June 11, 2018 08:29
To: Eiffel Users <eiffel...@googlegroups.com>
Subject: Re: [eiffel-users] 2GB Memory Limit

 

Hi Larry,

 

I discovered a problem with my compiled 32 bit EXEs running on a Windows 64 OS, in that apparently by default, a 32Bit application can only use 2GB of memory.  I was able to work around this by setting the LARGEADDRESSAWARE flag for my EXE and that allowed it to go above the 2 GB memory limit.

 

I used the Microsoft Visual Studio 'editbin' tool to set this flag on the EXE after compilation.

 

 

What would be great, is if I was able to apply this flag to a 'frozen' EXE so that I could have it also applied when testing in Workbench mode.  I'm sure this could be done but I haven't actually investigated how to do this.  I'm guessing a simple way to implement a C compilcation flag in Eiffelstudio?

 

A workaround could be to apply it to the frozen EXE itself but then you'd have to do this everytime you re-freeze your code.

 

Not sure if this relates to your issue, but I thought I'd throw it out there just in case,

Hubert

 

On Mon, Jun 11, 2018 at 10:27 AM, Larry Rix <lar...@moonshotsoftware.com> wrote:

Is Eiffel subject to a 2GB memory limit? If so, is there a way around it? Is it Eiffel that is limited or is it something else?

--

You received this message because you are subscribed to the Google Groups "Eiffel Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.

 

--

You received this message because you are subscribed to the Google Groups "Eiffel Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.

Hubert Cater

unread,
Jun 12, 2018, 9:32:16 AM6/12/18
to Eiffel Users
Thanks Manu, this is helpful indeed as I was not able to add a linker flag in the older version of Eiffelstudio I was running so was unaware that this had now become an option with the latest version.   Great stuff :)

Hubert

On Mon, Jun 11, 2018 at 11:07 PM, Emmanuel Stapf <ma...@eiffel.com> wrote:

It is easy to pass the linker flag “/LARGEADDRESSAWARE” to allow the 3GB memory addressing. Go to the project settings and under Advanced->Externals choose `Add linker flag` and enter the above flag. However, 32-bit Windows are pretty rare those days and it is recommended to compile in 64-bit mode instead.

 

Manu

 

From: eiffel...@googlegroups.com <eiffel...@googlegroups.com> On Behalf Of Hubert Cater
Sent: Monday, June 11, 2018 08:29
To: Eiffel Users <eiffel...@googlegroups.com>
Subject: Re: [eiffel-users] 2GB Memory Limit

 

Hi Larry,

 

I discovered a problem with my compiled 32 bit EXEs running on a Windows 64 OS, in that apparently by default, a 32Bit application can only use 2GB of memory.  I was able to work around this by setting the LARGEADDRESSAWARE flag for my EXE and that allowed it to go above the 2 GB memory limit.

 

I used the Microsoft Visual Studio 'editbin' tool to set this flag on the EXE after compilation.

 

 

What would be great, is if I was able to apply this flag to a 'frozen' EXE so that I could have it also applied when testing in Workbench mode.  I'm sure this could be done but I haven't actually investigated how to do this.  I'm guessing a simple way to implement a C compilcation flag in Eiffelstudio?

 

A workaround could be to apply it to the frozen EXE itself but then you'd have to do this everytime you re-freeze your code.

 

Not sure if this relates to your issue, but I thought I'd throw it out there just in case,

Hubert

 

On Mon, Jun 11, 2018 at 10:27 AM, Larry Rix <lar...@moonshotsoftware.com> wrote:

Is Eiffel subject to a 2GB memory limit? If so, is there a way around it? Is it Eiffel that is limited or is it something else?

--

You received this message because you are subscribed to the Google Groups "Eiffel Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users+unsubscribe@googlegroups.com.

Hubert Cater

unread,
Jun 12, 2018, 10:13:10 AM6/12/18
to Eiffel Users
Hi Manu,

When I try and add the linker flag as described above, I receive the following error:

Fatal error LNK1181: cannot open input file '\LARGEADDRESSAWARE.obj'

I'm unfortunately bound to 32-bits at the moment due to using a 32-bit custom 3D library for my project.

Hubert

On Mon, Jun 11, 2018 at 11:07 PM, Emmanuel Stapf <ma...@eiffel.com> wrote:

It is easy to pass the linker flag “/LARGEADDRESSAWARE” to allow the 3GB memory addressing. Go to the project settings and under Advanced->Externals choose `Add linker flag` and enter the above flag. However, 32-bit Windows are pretty rare those days and it is recommended to compile in 64-bit mode instead.

 

Manu

 

From: eiffel...@googlegroups.com <eiffel...@googlegroups.com> On Behalf Of Hubert Cater
Sent: Monday, June 11, 2018 08:29
To: Eiffel Users <eiffel...@googlegroups.com>
Subject: Re: [eiffel-users] 2GB Memory Limit

 

Hi Larry,

 

I discovered a problem with my compiled 32 bit EXEs running on a Windows 64 OS, in that apparently by default, a 32Bit application can only use 2GB of memory.  I was able to work around this by setting the LARGEADDRESSAWARE flag for my EXE and that allowed it to go above the 2 GB memory limit.

 

I used the Microsoft Visual Studio 'editbin' tool to set this flag on the EXE after compilation.

 

 

What would be great, is if I was able to apply this flag to a 'frozen' EXE so that I could have it also applied when testing in Workbench mode.  I'm sure this could be done but I haven't actually investigated how to do this.  I'm guessing a simple way to implement a C compilcation flag in Eiffelstudio?

 

A workaround could be to apply it to the frozen EXE itself but then you'd have to do this everytime you re-freeze your code.

 

Not sure if this relates to your issue, but I thought I'd throw it out there just in case,

Hubert

 

On Mon, Jun 11, 2018 at 10:27 AM, Larry Rix <lar...@moonshotsoftware.com> wrote:

Is Eiffel subject to a 2GB memory limit? If so, is there a way around it? Is it Eiffel that is limited or is it something else?

--

You received this message because you are subscribed to the Google Groups "Eiffel Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users+unsubscribe@googlegroups.com.

r...@amalasoft.com

unread,
Jun 12, 2018, 10:24:27 AM6/12/18
to eiffel...@googlegroups.com
Hi Hubert
 
Just checked in 18.01, and when you go the Advanced-Externals section, if you right-click on the "Externals" item, you will get the popup to allow you to add a linker flag.  Is that what you tried?
 
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.

Hubert Cater

unread,
Jun 12, 2018, 11:13:50 AM6/12/18
to Eiffel Users
Yes, thank you and I did try this and in the 'value' field used \LARGEADDRESSAWARE as suggested, yet the c compilation error result is that it cannot find '\LARGEADDRESSAWARE.obj'. 

r...@amalasoft.com

unread,
Jun 12, 2018, 11:38:10 AM6/12/18
to eiffel...@googlegroups.com
Hu Hubert
Very interesting!  I just added a flag that way, and I check the .ecf file to see what changed, and it looked just fine BUT, then I tried to freeze the project and, sure enough, the linker flag magically morphed into "bozo.obj".
Nice find!
 
 
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.

Hubert Cater

unread,
Jun 12, 2018, 11:46:54 AM6/12/18
to Eiffel Users
Great and good to know I wasn't missing the obvious and hopefully this can be easily corrected as I for one will find it useful going forward.

Peter Gummer

unread,
Jun 12, 2018, 6:44:09 PM6/12/18
to 'Alexander Kogtenkov' via Eiffel Users
Hi Hubert,

That should be /LARGEADDRESSAWARE, as Manu recommended: forward slash, not backslash.

Peter

Hubert Cater

unread,
Jun 12, 2018, 8:39:50 PM6/12/18
to 'Alexander Kogtenkov' via Eiffel Users
Hi Peter,

That was a typo in my response, using the forward slash is what produced that particular error from C compilation in Eiffelstudio 18.01.

Hubert

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.

Emmanuel Stapf

unread,
Jun 12, 2018, 11:22:12 PM6/12/18
to eiffel...@googlegroups.com

Use -LARGEADDRESSAWARE instead.

 

Manu

 

From: eiffel...@googlegroups.com <eiffel...@googlegroups.com> On Behalf Of Hubert Cater

Hubert Cater

unread,
Jun 13, 2018, 8:56:59 AM6/13/18
to Eiffel Users
Thanks Manu, that seems to have done the job :)

To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages