[icecast] Darkice memory leak

Kristjan Gu?ni Bjarnason kgb at gangverk.is
Tue Apr 9 05:44:39 PDT 2002



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?

Kristjan

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

<p>Unfortunately I can't reproduce your memory leak reports. For example,
here is the line about my production darkice instance from top:

   PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
27516 root      20   0  3564 3564  1340 S    95.6  1.3  47:06 darkice

<p>this as after approx 50 minutes from start, but the memory load doesn't
change for the whole 4 hours it runs.

What's even more strange, is that darkice does not allocate memory
itself after initialization. I can only guess that the only place memory
can leak is in the libraries darkice uses.

Kristjan or Nicu, can you send me the exact libraries that you'r using?

<p>Akos

<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