[icecast] Darkice memory leak

Kristjan Gu?ni Bjarnason kgb at gangverk.is
Tue Apr 9 13:39:07 UTC 2002



My pleasure.  Finally I managed to return something to the open source
society.

Kristjan

<p>-----Original Message-----
From: owner-icecast at xiph.org [mailto:owner-icecast at xiph.org]On Behalf Of
Akos Maroy
Sent: 9. april 2002 12:56
To: icecast at xiph.org
Subject: Re: [icecast] Darkice memory leak

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

<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