
Hi
If I specified boost::fast_pool_allocator<int> does the library take care of somehow doing a rebind and allocating the right amount of memory for the states ?
Yes, please see: http://www.boost.org/doc/libs/1_35_0/libs/statechart/doc/faq.html#HardRealti... http://www.boost.org/doc/libs/1_35_0/libs/statechart/doc/reference.html#Clas..., Allocator parameter http://www.boost.org/doc/libs/1_35_0/libs/statechart/doc/reference.html#Clas..., Allocator parameter [snip]
struct Enabled; struct Machine : sc::state_machine< Machine, Enabled, boost::fast_pool_allocator< int > > /* ??? is this right ? */ { Machine(); ~Machine() { terminate(); } int ContextAssociatedwithStateMachine; };
Looks good to me. boost::fast_pool_allocator< int > is used in the performance example here: http://www.boost.org/doc/libs/1_35_0/libs/statechart/example/Performance/Per... HTH & Regards, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.