[Live-devel] Memory leak in OnDemandServerMediaSubsession

Ba Jinsheng bajinsheng at u.nus.edu
Sun Jan 9 22:54:39 PST 2022


I am not sure if the design is like this, but it does incur unstopping memory increasing.


OnDemandServerMediaSubsession::getStreamParameters() in liveMedia/OnDemandServerMediaSubsession.cpp 
This function will allocate a new StreamState object and append it to the global array: fStreamStates.
Within the new StreamState, some objects are allocated, such as rtcpGroupsock.
However these new allocated memory seem only be freed by streamState->reclaim(); in afterPlayingStreamState() function.
And this function seems not be executed.

After a while, what I observe is that all these new allocated memory are not freed.
I guess the size of fStreamState is not limited?

At least, it is unnormal to consume more than 2GB after sending the same request for 1 minute, and the rtcpGroupsock consumes around 1 GB itself , right?


Best regards,
Jinsheng Ba

-----Original Message-----
From: live-devel <live-devel-bounces at us.live555.com> On Behalf Of Ross Finlayson
Sent: Monday, January 10, 2022 2:06 PM
To: LIVE555 Streaming Media - development & use <live-devel at us.live555.com>
Subject: Re: [Live-devel] Memory leak in OnDemandServerMediaSubsession

        - External Email -



Unfortunately, reports of memory leaks aren’t worthwhile for me to investigate unless you can identify a specific object (class) that is allocated, and not later deallocated.  Otherwise I can’t be sure that the heap isn’t just growing due to fragmentation - i.e., not a real memory leak.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel



More information about the live-devel mailing list