>Hi, I wrote a simple but very efficient real time safe memory allocator
> in C++ that is useful in real time audio apps where you need to allocate
>objects dynamically. 
>(badly enough there are still too many audio developers that
>call new,delete, malloc() and free() within the  audio RT thread !)

... although you might find ardour/libs/pbd/pool.cc to be more
generically useful, since it includes provision for:

      - allocation and release without locks (i.e. the same
            thread is assumed to do both)
      - allocation and/or release with locking (i.e. multiple
            threads using the pool)
      - named pools         

its about 100 lines of code, if that, though it builds on the
ringbuffer class.

--p

Reply via email to