Hi all, I'm using boost.MSM for a productive embedded system. My concern is, that my compiler produces a executable size of all most 2MB for a state machine consisting of 4 sub-machine and nearly 40 transition for the complete state machine, but with no action and guard code. My compilation system is as follows: - eclipse juno - mingw 4.7.0 - Compiler settings for the release of the binary are: "-O3 -Wall -c -fmessage-length=0" Is this a good size or should I be worried about this nearly 2 MB for the release executable? I'm asking as like stated in http://www.boost.org/doc/libs/1_52_0/libs/msm/doc/HTML/ch04s02.html http://www.boost.org/doc/libs/1_52_0/libs/msm/doc/HTML/ch04s02.html the executable size for a good sized state machine could reach a size of almost 600kB, and my state machine is still not finished (50 % more code has to be added for further submachine...) Using the "-Os" produces a executable size which is almost 20% smaller as with the "-O3". In case I compile the state machine with the default debug level (-g) the binary is allmost 35MB big.... The compilation takes around 1m:30sec ( using the *favor_compile_time* policy)... Best regard, RaRi -- View this message in context: http://boost.2283326.n4.nabble.com/Boost-MSM-Executable-size-tp4641132.html Sent from the Boost - Users mailing list archive at Nabble.com.
Hi,
Hi all,
I'm using boost.MSM for a productive embedded system. My concern is, that my compiler produces a executable size of all most 2MB for a state machine consisting of 4 sub-machine and nearly 40 transition for the complete state machine, but with no action and guard code.
My compilation system is as follows:
- eclipse juno - mingw 4.7.0 - Compiler settings for the release of the binary are: "-O3 -Wall -c -fmessage-length=0"
Is this a good size or should I be worried about this nearly 2 MB for the release executable?
No idea, it depends on your configuration, what you link with,etc. But from what I saw, yes, gcc is generating much bigger executables than, say, VC.
I'm asking as like stated in http://www.boost.org/doc/libs/1_52_0/libs/msm/doc/HTML/ch04s02.html http://www.boost.org/doc/libs/1_52_0/libs/msm/doc/HTML/ch04s02.html
the executable size for a good sized state machine could reach a size of almost 600kB, and my state machine is still not finished (50 % more code has to be added for further submachine...)
Using the "-Os" produces a executable size which is almost 20% smaller as with the "-O3".
In case I compile the state machine with the default debug level (-g) the binary is allmost 35MB big....
You should in any case strip (-s), it will be better, but still bigger than VC. This is a more general gcc compiler and template issues and I'm not a specialist.
Best regard,
RaRi
Regards, Christophe
participants (2)
-
Christophe Henry
-
RaRi