Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.MSM cc1plus.exe:: error: out of memory allocating 65532
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2013-02-27 10:52:42


> Hi,
>
> does anyone have a tip, how this problem could be solved?
>
> Maybe the boost.MSM developer/maintainer (Christophe Henry) has some
> suggestions....
>
>
> Thanks so far.

You're at the max of what gcc on Windows offers ;-)
Seriously, you have to simplify your machine. 8 submachines are really hard,
plus 44 events, it's already a wonder the compiler survives. You might be
building the God pattern as a fsm.
What I suggest:
- replace submachines by orthogonal regions where you can
- reduce your number of events. Events are where the biggest costs come
from. Use some event hierarchy + guards to differentiate or maybe some
events for serveral similar tasks and differentiate with guards. Sometimes,
some data passed in the event suffices.
- you can try favor_compile_time. It has limitations but it will compile
faster, and on more TUs, which will help
- if none of this help, there is still the last ultimate trick ;-) : force
instantiation of process_event calls for some events on different TUs by
defining the fsm in a header but making the process_event calls in different
.cpp. Ok, this is really as a last resort...
- maybe, simply breaking your fsm into different classes behind interfaces
with smaller fsms would be advisable. It'll also make it easier to
understand.

HTH,
Christophe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net