Warning message

A

arush

Hello,
My program in C runs fine on visual stdio. I get this warning

warning LNK4084: total image size 437272576 exceeds max (268435456);
image may not run

but the results are fine .Can someone guide me as to what this
message is and how i can get rid of it .

Arush
 
A

Alf P. Steinbach

* arush:
Hello,
My program in C runs fine on visual stdio. I get this warning

warning LNK4084: total image size 437272576 exceeds max (268435456);
image may not run

but the results are fine .Can someone guide me as to what this
message is and how i can get rid of it .

It means your program is larger than some limit imposed by your
environment (268435456 bytes = 256 MiB).

To get rid of that warning you need to reduce the size of your executable.

About the only way you can get an executable that large is by using a
namespace level large raw array. Use std:.vector instead. And just say
no to globals.
 
G

Gennaro Prota

* arush:

It means your program is larger than some limit imposed by your
environment (268435456 bytes = 256 MiB).

Yep. I was going to suggest to look at the MS docs... but this time
the OP is right: all I can see there is "The application exceeds the
limit of 256 megabytes.".

That's odd, as normally the MS documentation isn't so useless (render
unto Caesar... :))

Now, if memory serves me correctly, Windows 95 and NT 4.0 pre-SP3 had
a process virtual address space limit of 256 MiB. The rest of the
Windows 32-bit family members have a 2 GiB limit (though linkers
aren't required to reach it :)). The warning can be suppressed, but
he should really shrink the executable a bit :-s
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top