[mythtv-commits] Re: Ticket #444: Memory leak - pespacket handling

MythTV mythtv at cvs.mythtv.org
Mon Oct 10 18:35:53 UTC 2005


#444: Memory leak - pespacket handling
---------------------+------------------------------------------------------
 Reporter:  stuarta  |        Owner:  danielk
     Type:  patch    |       Status:  closed 
 Priority:  minor    |    Milestone:  0.19   
Component:  mythtv   |      Version:  head   
 Severity:  low      |   Resolution:  fixed  
---------------------+------------------------------------------------------
Changes (by danielk):

  * resolution:  => fixed
  * status:  new => closed

Comment:

 (In [7432]) Fixes #444 and some other memory leaks.

 This fixes the all the PES leaks I see on channel changes
 with the DVB recorder.

 This doesn't use the patch in #444, but fixes that problem
 and other problems with PES packet memory allocation and use.

 In TVRec and SIScan it adds missing ReturnCachedTable calls.
 It adds a DeleteCachedTable() to ATSCStreamData(), and adds
 an explicit destructor to ATSCStreamData() that calls Reset().
 These changes prevent the leak of 8KB on each channel change.

 This also fixes the leak reported in #444, but does this by
 handling the special case of a copy from a zero copy PES
 packet to a regular PES packet a little more correctly.
 This was leaking at least 512 bytes on each channel change.

 This also adds a private memory allocation rutine for PES
 packets, which takes advantage high number of 188 byte and
 4 KB allocations, falling back to malloc when it a packet
 is not one of these two sizes.

 Finally, this fixes the handling of PES packets larger than
 4 KB, before we would punt with a warning when this happened.
 With this commit we reallocate if the PES packet grows larger
 than the allocated size.

-- 
Ticket URL: <http://cvs.mythtv.org/trac/ticket/444>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list