diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-04-11 14:06:50 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-04-11 14:06:50 +0000 |
commit | cb413146428ce5db5e281d70f2b3b7df27c1aaab (patch) | |
tree | 4961e9dcb107f2ca1f0a4298faf5135ba8611d92 /libs/ardour/ardour/automation_event.h | |
parent | 9aa8af5a28abbb86c9ae86c6991838eb6828d0a9 (diff) |
merge 3.0 from 2.0-ongoing@3243
git-svn-id: svn://localhost/ardour2/branches/3.0@3248 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/automation_event.h')
-rw-r--r-- | libs/ardour/ardour/automation_event.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libs/ardour/ardour/automation_event.h b/libs/ardour/ardour/automation_event.h index 1831f5ca4d..4f8406bd9b 100644 --- a/libs/ardour/ardour/automation_event.h +++ b/libs/ardour/ardour/automation_event.h @@ -27,6 +27,9 @@ #include <sigc++/signal.h> #include <glibmm/thread.h> +#include <boost/pool/pool.hpp> +#include <boost/pool/pool_alloc.hpp> + #include <pbd/undo.h> #include <pbd/xml++.h> #include <pbd/statefuldestructible.h> @@ -67,12 +70,21 @@ struct ControlEvent { double* coeff; ///< double[4] allocated by Curve as needed }; +/* automation lists use a pool allocator that does not use a lock and + allocates 8k of new pointers at a time +*/ + +typedef boost::fast_pool_allocator<ControlEvent*, + boost::default_user_allocator_new_delete, + boost::details::pool::null_mutex, + 8192> ControlEventAllocator; class AutomationList : public PBD::StatefulDestructible { public: - typedef std::list<ControlEvent*> EventList; + typedef std::list<ControlEvent*,ControlEventAllocator> EventList; typedef EventList::iterator iterator; + typedef EventList::reverse_iterator reverse_iterator; typedef EventList::const_iterator const_iterator; AutomationList (Parameter id, double min_val, double max_val, double default_val); |