[LAD] [ANN] The Audio Rollendurchmesserzeitsammler V0.0.1
Kjetil S. Matheussen
k.s.matheussen at notam02.no
Mon Apr 28 18:26:22 UTC 2008
The Audio Rollendurchmesserzeitsammler V0.0.1.
(Sorry for the long text below. I'm not planning to do
big announcements of further versions of the collector.
There is also more information about how it works, etc.,
in the README file in the source package.)
The Audio Rollendurchmesserzeitsammler is a garbage collector
which provides a general way to efficiently allocate and use memory
inside a realtime audio thread without having to manually free
Furthermore, there is no write barrier,
no read barrier, no special pointer types or templates (ie. no need to
tell the collector exactly where pointers are), no reference counting,
cyclic dependencies are detected, and finally it is by default
configured to be hard realtime safe.
Finally, The Audio Rollendurchmesserzeitsammler can be a drop in
replacement for Hans Boehm's conservative garbage collector for C
(Regarding its realtime safiness, I think CPU caches might theoretically
play an unpredictable role to screw things up, but my limited
observations so far is that it doesn't, or at least doesn't screw
up a lot.)
GARBAGE COLLECTOR TYPE
Short: Snapshot mark-and-sweep.
Long: Hard realtime conservative parallel non-moving snapshot-mark-sweep-and-free.
This collector might be useful for running high level, high performing,
and garbage producing languages such as C#, Clean, Common Lisp, D,
Eiffel, Haskell, Java, Oberon-2, OCaml, Scheme or SML directly inside a
realtime audio thread doing signal processing.
It can also be useful for running less high performing programming
languages which are not doing signal processing directly but would still
be convenient to run inside the realtime audio thread, for example for
handling midi events.
By replacing the garbage collector in a high level language with
the one provided in this package, the language becomes one step closer
to be able to do realtime signal processing directly in the audio thread.
And in some cases, this might very well be all thats needed too.
One example is Stalin, an extremely efficient Scheme compiler.
By only replacing Hans Boehm's garbage collector, which Stalin normally
is using, Stalin's generated code can now run safely inside a realtime
See the provided example stalinwrapper.c / graincloud.scm how to
The allocator is also so effective, that its not unlikely that in some
cases it might make sense using it in a program
written in C or C++ as well when doing larger computations.
The garbage collector uses TLSF for doing memory alloaction and
deallocation. TLSF is a memory manager library supporting both
bounded allocation time and bounded deallocation time.
gcconfig.h is copied from Hans Bohems garbage collector.
More information about the Linux-audio-dev