The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: shaldan on March 15, 2006, 07:32:52 AM

Title: executable size
Post by: shaldan on March 15, 2006, 07:32:52 AM
Hello to assembler ancient ones :)).
I have simple clearly theoretical question:

Are there any speed or other penalties from a size of executable ?

Suppose I have a application, that have for example with graphics and sound 50MB or more MB.
If I merge it together to one executable will there be any problem when executing ?

I know this way I cannot test, if a user has enough memory .... it is just a general question.

thank you :)
Title: Re: executable size
Post by: Mark Jones on March 15, 2006, 08:25:19 AM
Hello Shaldan,

No you generally wouldn't want to make a single executable which is 50MB, because the entire thing must fit into RAM to run. It is possible to do this, however - but what if someone tries to run it and they only had 64MB of RAM? :lol

A better approach to large projects like this might be to put the audio and video into separate folders or data streams, and load only what is needed for the next level/minute/etc. Then you end up with a small executable and some large data files, which will work on all computers.

Good Luck. :bg
Title: Re: executable size
Post by: shaldan on March 15, 2006, 08:38:14 AM
:)) I know that it is not convinient way to do .. but the question was ... Are there any penalties with speed or anything else ?. Lets suppose that all users have 2x more RAM than the size of my executable.  Just curious. Nothing more. :))

thanks
Title: Re: executable size
Post by: Tedd on March 15, 2006, 12:16:59 PM
The only speed penalty would be from the operating system getting all of the program into memory, and the cpu fitting the necessary parts into its cache. For the latter, this depends on the structure of the program, not necessarily its size.
But, in general, a small program 'should' have fewer problems.
Title: Re: executable size
Post by: shaldan on March 15, 2006, 12:35:20 PM
thank you Tedd ... that is interesting.
This kind of an answer i wanted to get.
thank you.