Jump to content
  • Advertisement
Sign in to follow this  
Matt Green

VS8 executable size increase?

This topic is 5101 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Anyone know why VS8 is generating DLLs and executables that are on average 30-40k larger than those of VS7.1? I'd carefully tuned them down to minimal size in VS7.1, but it has all been undone now. :(

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I am guessing that for the executables, at least, it has something to do with embedding the manifest, which I did not see occur in 7.1.

Share this post


Link to post
Share on other sites
I don't have VC8 but if I had to make a guess...

There might be changes in the CRT which make it larger than previous versions. Can you try checking CRT size?

Share this post


Link to post
Share on other sites
Oh also I recall something about sinle-threaded libraries being removed. So that could be it. Try compiling on VC7.1 with multi-threaded libs and compare.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by ProgramMax
Oh also I recall something about sinle-threaded libraries being removed. So that could be it. Try compiling on VC7.1 with multi-threaded libs and compare.


That's not it. I recompiled a multi-threaded prog in the new compiler, and it added the 40kb Matt is asking about, as compared to 7.1 also using multi-threaded libs. CRT changes don't make a lot of sense, either, as I wasn't using any of the new 'safer' string handling routines in the recompile. More sense would be the PE headers being changed for some reason (forward-looking changes for Vista?), but ??? With all of that speculation, I'll stick with my guess that it has more to do with the manifest, but I could be wrong.

Share this post


Link to post
Share on other sites
Are you sure it couldn't be CRT changes? I mean...the CRT definatly changes each time. And it definatly takes up a different amount of space.

Even if you aren't changing your function calls, you might be suprised how much of the CRT gets into your app. Just by trimming the CRT off my apps I can save about 40kb.

Note: That 40kb save doesn't means "Oh the numbers match! That must be it." The change between the VC7.1 CRT and the VC8 CRT has no relation to the orional CRT size. It just happens to be a coincidence.

Share this post


Link to post
Share on other sites
Likely the problem is that you didn't disable all the new security checks, so the generated code is littered with all kinds of error checks that don't need to be there if the code works, but were put there so that when your program breaks it will be more obvious what happened and why MS isn't to blame.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!