Re: [linux-audio-dev] Wrote a real time safe memory allocator in C++

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Wrote a real time safe memory allocator in C++
From: Paul Davis (paul_AT_linuxaudiosystems.com)
Date: Thu Sep 04 2003 - 01:07:46 EEST


>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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Sep 04 2003 - 01:15:40 EEST