[icecast] Darkice memory leak
Akos Maroy
darkeye at tyrell.hu
Tue Apr 9 12:56:18 UTC 2002
Kristjan Gu?ni Bjarnason wrote:
> I was looking more closely on the source for Darkice. I found the code for
> calulating the buffersize somewhat strange. Your is snapshot taken from the
> init function in CastSink.cpp :
>
> int bufferSize = bitRate ? (bitRate * 1024 / 8) * bufferDuration
> : (128 * 1024 / 8) * bufferDuration;
> bufferedSink = socket ? new BufferedSink( socket,
> (bufferSize * 1024 / 8) *
> bufferDuration)
> : 0;
>
> In my case the bufferDuration is 10 and bitrate 128. Why is the do we
> multiply by 'bufferSize*1024/8*bufferDuration twice?
> The constructor for BufferedSink allocates the buffer with the 2nd param as
> the buffersize. In my case the 'chunkSize' is 1 which gives bufferSize =
> 209.715.200 bytes. I am wrong? Is this healty?
Not, not healthy :)
This was a last minute change before I released 0.9. Appearantly you
pinpointed the problem. I'll issue a 0.9.1 release shortly...
Thanks for looking into the problem and pinpointing it.
<p>Akos
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Icecast
mailing list