Subject: Re: [boost] [msm] Message queue and copy constructed events
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2010-06-16 17:32:46
>I have that request as well to use the MSM without heap actually I
>have managed to compile MSM in an embedded target without stdlib,
>rtti, exception and no heap but only if queues are disabled.
Yes, message queue and deferred event queue.
>In our system we never copy events and for us the best would be if you
>could just able to provide us a backend to use our own event queue
>implementation where we make sure that we use a queue form the RT
>scheduler where no copy operation is required.
I think it's two different issues. Having your own queue will save you
the heap cost of the std::queue but not the copy, which is done by
Of course I could use ref/cref but there is no way for msm to know how
long the event will still be around, unless we add the possibility for
a user to tell msm that the event will be around long enough (using
some typedef for example).
This will, however, not remove completely the heap costs as the bind
is then passed to a boost::function (to anonymize the event) => heap.
Thus, just providing another container will not do the trick easily.
What kind of container are you thinking about?