Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Functional > ANN: The Audio ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 2827 of 2841
Post > Topic >>

ANN: The Audio Rollendurchmesserzeitsammler V0.0.1

by "Kjetil S. Matheussen" <k.s.matheussen@[EMAIL PROTECTED] > May 1, 2008 at 02:38 PM

(It's been suggested that I post this announcement on comp.lang.scheme
 and comp.lang.functional as well as computer music specific fora,
 so here it goes. Note that the garbage collector exploits the 
 specific nature of audio block processing to perform snapshots, so the
 (very simple) technique its using does not work in general to guarantee
 hard realtime.)



The Audio Rollendurchmesserzeitsammler V0.0.1.

http://www.notam02.no/arkiv/src/rollendurchmesserzeitsammler-0.0.1.tar.gz



ABOUT
-----
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
it later.

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
and 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.



PURPOSE
-------
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.
(http://shootout.alioth.debian.org/)

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 
audio thread.

See the provided example stalinwrapper.c / graincloud.scm how to
do that.

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.




CREDITS
-------
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.
http://rtportal.upv.es/rtmalloc/

gcconfig.h is copied from Hans Bohems garbage collector.
http://www.hpl.hp.com/personal/Hans_Boehm/gc/




 6 Posts in Topic:
ANN: The Audio Rollendurchmesserzeitsammler V0.0.1
"Kjetil S. Matheusse  2008-05-01 14:38:08 
Re: ANN: The Audio Rollendurchmesserzeitsammler V0.0.1
Tzvetan Mikov <tmikov.  2008-05-01 08:15:22 
Re: ANN: The Audio Rollendurchmesserzeitsammler V0.0.1
"Kjetil S. Matheusse  2008-05-01 17:37:39 
Re: ANN: The Audio Rollendurchmesserzeitsammler V0.0.1
Tzvetan Mikov <tmikov.  2008-05-01 12:15:20 
Re: ANN: The Audio Rollendurchmesserzeitsammler V0.0.1
"Kjetil S. Matheusse  2008-05-01 23:07:07 
Re: ANN: The Audio Rollendurchmesserzeitsammler V0.0.1
Tzvetan Mikov <tmikov.  2008-05-01 15:10:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 21:40:13 CDT 2008.