Skip Menu |

This queue is for tickets about the Audio-DSP CPAN distribution.

Report information
The Basics
Id: 4156
Status: new
Priority: 0/
Queue: Audio-DSP

People
Owner: Nobody in particular
Requestors: paulb [...] cajun.nu
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Audio::DSP leaks memory
Audio::DSP leaks a large amount of memory, when returning buffers of audio to the application (during a 'read' or 'dread' call, and possibly others). In my application, I'm recording 44khz/16b/2ch for hours or days, so it doesn't take long to exhaust the machine's memory complely and make it fail. The problem is that the returned buffers need to be marked mortal so perl frees them when the user is done with the data. As they are not mortal, they are never freed. For example, in dread(), the XPUSHs statement *should* look like the following: XPUSHs(sv_2mortal(newSVpvn(buf, status))); the 'sv_2mortal' call is missing, so the buffer is never marked. It's quite likely that other data structures are affected (other than the ones returned by read and dread) but I haven't verified this.