[27 Dec 2009] if program is compiled as 1 .exe file, does it need more memory to use it?

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
Bugala
Posts: 1410
Joined: Sun Feb 14, 2010 7:11 pm

[27 Dec 2009] if program is compiled as 1 .exe file, does it need more memory to use it?

Post by Bugala »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 27 Dec 2009 10:32:31 -0000

In compiling there is this option to include all the necessary files (brushes, sounds...) in one big .exe file.

If .exe files size is after that, say 100 Mb, does that mean that to run that program you need that 100 Mb of free memory?

Or does it only load the code part (ie. 1 Mb) and then keep loading those pictures and sounds on as needed basis, hence taking only say 2 Mb of memory to use the program?

If it does the latter way, then does it use more memory than putting separate .exe file and separate brush/sound files, and if it does take more memory to use .exe, then how much more memory does it take?

Is it like double the memory, or for example in way of 2Mb at start + size of files in use + 10 percent?
User avatar
airsoftsoftwair
Posts: 5915
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[28 Dec 2009] Re: if program is compiled as 1 .exe file, does it need more memory to use it?

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 28 Dec 2009 21:43:31 +0100
In compiling there is this option to include all the necessary files (brushes, sounds...) in one big .exe file.

If .exe files size is after that, say 100 Mb, does that mean that to run that program you need that 100 Mb of free memory?
No, of course not. It just the loads the code which is about 800kb to 1.5MB depending on the platform. PPC code is usually larger than 68k and x86 code.
Or does it only load the code part (ie. 1 Mb) and then keep loading those pictures and sounds on as needed basis, hence taking only say 2 Mb of memory to use the program?

If it does the latter way, then does it use more memory than putting separate .exe file and separate brush/sound files, and if it does take more memory to use .exe, then how much more memory does it take?
It doesn't take more memory to link everything into your executable. However, you always need to keep in mind that you free all data that you no longer need. Otherwise you could end up with your program consuming 100 MB or so :) So make sure that you free all brushes, layers, anims, sounds etc. that you no longer need.

Hollywood 4.5 will come with a resource monitor that shows exactly how much data Hollywood currently has in cache. This is very useful to see if your script has a memory problem, i.e. it is consuming steadily more memory :)
Locked