How to reduce virtual memory allocated by each GStreamer stream?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to reduce virtual memory allocated by each GStreamer stream?

Linux - Junior Polegato
Hi!

         I need to put 32 RTSP/H264 streams in a Gtk window, but each
stream allocates about 200 MB of virtual memory and 30 MB of real memory.

         So, when allocated more then 3.5 GB the system falls with
messages like "Segmentation fault" ou "Can't allocate memory".

         If I open 2 windows with 16 streams each, about 3 GB allocated
each, it works fine.

         So, how can I reduce the allocated virtual memory?

         The code:
https://gist.github.com/JuniorPolegato/62d9d1a29a9438bc13a441cd54cb67a6

         Thanks.


--

[]'s

Junior Polegato

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to reduce virtual memory allocated by each GStreamer stream?

Sebastian Dröge-3
On Fri, 2016-09-09 at 17:43 -0300, Linux - Junior Polegato wrote:

> Hi!
>
>          I need to put 32 RTSP/H264 streams in a Gtk window, but
> each 
> stream allocates about 200 MB of virtual memory and 30 MB of real
> memory.
>
>          So, when allocated more then 3.5 GB the system falls with 
> messages like "Segmentation fault" ou "Can't allocate memory".
>
>          If I open 2 windows with 16 streams each, about 3 GB
> allocated 
> each, it works fine.
>
>          So, how can I reduce the allocated virtual memory?
As a first step, try using a tool like valgrind's massif to see where
all the memory is allocated, and especially where the major part of it
is allocated. Then these specific parts can be optimized.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (949 bytes) Download Attachment