27 #include <glibmm/threads.h>
54 return free_list.read_space ();
58 return free_list.bufsize () - available ();
62 return free_list.bufsize ();
134 return pending.read_space ();
153 const Glib::Threads::Private<CrossThreadPool>&
key ()
const
167 Glib::Threads::Private<CrossThreadPool>
_key;
PerThreadPool * parent() const
PBD::RingBuffer< void * > pending
guint pending_size() const
CrossThreadPool(std::string n, unsigned long isize, unsigned long nitems, PerThreadPool *, PoolDumpCallback)
void flush_pending_with_ev(void *)
MultiAllocSingleReleasePool(std::string name, unsigned long item_size, unsigned long nitems)
Glib::Threads::Mutex m_lock
virtual void release(void *)
~MultiAllocSingleReleasePool()
PBD::RingBuffer< CrossThreadPool * > * _trash
bool has_per_thread_pool()
void create_per_thread_pool(std::string name, unsigned long item_size, unsigned long nitems, PoolDumpCallback cb=NULL)
const Glib::Threads::Private< CrossThreadPool > & key() const
Glib::Threads::Mutex _trash_mutex
void add_to_trash(CrossThreadPool *)
void set_trash(PBD::RingBuffer< CrossThreadPool * > *t)
CrossThreadPool * per_thread_pool(bool must_exist=true)
Glib::Threads::Private< CrossThreadPool > _key
PBD::RingBuffer< void * > free_list
a list of pointers to free items within block
Pool(std::string name, unsigned long item_size, unsigned long nitems, PoolDumpCallback cb=NULL)
virtual void release(void *)
PoolDumpCallback _dump
callback to print pool contents
void * _block
data storage area
Glib::Threads::Mutex m_lock
SingleAllocMultiReleasePool(std::string name, unsigned long item_size, unsigned long nitems)
virtual void release(void *)
~SingleAllocMultiReleasePool()
GtkImageIconNameData name
void(* PoolDumpCallback)(size_t, void *)