[chuck-users] SndBuf allocating 2x memory?

Josh Adams josh at gmail.com
Mon Apr 18 03:02:04 EDT 2011


Hey everybody,

After noticing my test SndBuf programs were eating more memory than I
expected I started looking around on the list and wiki but couldn't find any
relevant discussions.  Here's how it goes:

airj:~ josh$ chuck --version

chuck version: 1.2.1.3 (dracula)
   exe target: mac os x : universal binary
   http://chuck.cs.princeton.edu/

airj:~ josh$ cat tmp/buf.ck
SndBuf b;
"tmp/bigfile.wav" => b.read;
while (1::second => now);
airj:~ josh$ du -sk tmp/bigfile.wav
769308  tmp/bigfile.wav
airj:~ josh$ chuck --loop &
[1] 20706
airj:~ josh$ ps -orss= 20706
  4484
airj:~ josh$ chuck + tmp/buf.ck
airj:~ josh$ [chuck](VM): sporking incoming shred: 1 (buf.ck)...

airj:~ josh$ ps -orss= 20706
1531692
airj:~ josh$

Looks like ChucK/SndBuf's resident size is growing a little under 2x the
size of the file I'm trying to buffer.  Any ideas?

Cheers,
-josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20110418/9a4ca793/attachment.html>


More information about the chuck-users mailing list