Opened 14 years ago

Closed 14 years ago

#67 closed defect (fixed)

Memory leak in TEncSIFO.cpp and TEncAdaptiveLoopFilter.cpp (revision 178)

Reported by: li@… Owned by:
Priority: minor Milestone:
Component: HM Version:
Keywords: Cc: fbossen, ksuehring, davidf, jct-vc@…

Description

Memory leak was observed in TEncSIFO.cpp and TEncAdaptiveLoopFilter.cpp. With the attached encoder_lowdely.cfg and the patch of memory tracing (in ticket #66, revision 178 based), the memory leak was logged as follows.

Memory has not been freed:
In TEncSIFO.cpp line 551, memory was allocated at 0x03ab4180 (64B).
In TEncSIFO.cpp line 551, memory was allocated at 0x04971fd8 (64B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f1f00 (64B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f1848 (64B).
In TEncSIFO.cpp line 557, memory was allocated at 0x0468dec0 (2048B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f21b0 (64B).
In TEncSIFO.cpp line 557, memory was allocated at 0x046c2f70 (2048B).
In TEncSIFO.cpp line 557, memory was allocated at 0x0468d6b8 (2048B).
In TEncSIFO.cpp line 576, memory was allocated at 0x04883ff0 (16B).
In TEncSIFO.cpp line 557, memory was allocated at 0x03aaf8e0 (18432B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f2460 (64B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f1da8 (64B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f2710 (64B).
In TEncSIFO.cpp line 557, memory was allocated at 0x046c2768 (2048B).
In TEncSIFO.cpp line 551, memory was allocated at 0x03aaf800 (64B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f2058 (64B).
In TEncSIFO.cpp line 576, memory was allocated at 0x047cbff0 (16B).
In TEncAdaptiveLoopFilter.cpp line 4188, memory was allocated at 0x007859f0 (128B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f13c0 (64B).
In TEncSIFO.cpp line 576, memory was allocated at 0x04866d08 (16B).
In TEncSIFO.cpp line 551, memory was allocated at 0x04918fc0 (64B).
In TEncSIFO.cpp line 592, memory was allocated at 0x04919fc0 (16B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f2308 (64B).
In TEncSIFO.cpp line 557, memory was allocated at 0x046c3f80 (2048B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f2c70 (64B).
In TEncSIFO.cpp line 557, memory was allocated at 0x03aaaf60 (18432B).
In TEncAdaptiveLoopFilter.cpp line 4938, memory was allocated at 0x049eb1b8 (336B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f25b8 (64B).
In TEncSIFO.cpp line 557, memory was allocated at 0x046c3778 (2048B).
In TEncSIFO.cpp line 557, memory was allocated at 0x0468bea0 (2048B).
In TEncAdaptiveLoopFilter.cpp line 5248, memory was allocated at 0x049eeb90 (336B).
In TEncAdaptiveLoopFilter.cpp line 5249, memory was allocated at 0x049eed90 (336B).
In TEncAdaptiveLoopFilter.cpp line 5250, memory was allocated at 0x049eef90 (168B).
In TEncAdaptiveLoopFilter.cpp line 4967, memory was allocated at 0x00785630 (128B).
In TEncSIFO.cpp line 551, memory was allocated at 0x03aaae80 (64B).
In TEncSIFO.cpp line 557, memory was allocated at 0x046c0f50 (2048B).
In TEncSIFO.cpp line 557, memory was allocated at 0x046f5698 (2048B).
In TEncSIFO.cpp line 557, memory was allocated at 0x0468b698 (2048B).
In TEncAdaptiveLoopFilter.cpp line 4963, memory was allocated at 0x049b1bf8 (336B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f2868 (64B).
In TEncSIFO.cpp line 557, memory was allocated at 0x046c0748 (2048B).
In TEncSIFO.cpp line 576, memory was allocated at 0x03aa63e0 (16B).
In TEncSIFO.cpp line 557, memory was allocated at 0x03aa65e0 (18432B).
In TEncSIFO.cpp line 557, memory was allocated at 0x0468ceb0 (2048B).
In TEncSIFO.cpp line 551, memory was allocated at 0x03aa6500 (64B).
In TEncSIFO.cpp line 557, memory was allocated at 0x04796468 (2048B).
In TEncSIFO.cpp line 576, memory was allocated at 0x0489dbc8 (16B).
In TEncSIFO.cpp line 551, memory was allocated at 0x04972130 (64B).
In TEncSIFO.cpp line 551, memory was allocated at 0x049f19a0 (64B).
In TEncAdaptiveLoopFilter.cpp line 5154, memory was allocated at 0x049ef0e8 (168B).
In TEncSIFO.cpp line 557, memory was allocated at 0x046c1f60 (2048B).
In TEncSIFO.cpp line 557, memory was allocated at 0x0468c6a8 (2048B).
In TEncSIFO.cpp line 557, memory was allocated at 0x046c1758 (2048B).
In TEncSIFO.cpp line 557, memory was allocated at 0x03ab4260 (18432B).

In TEncSIFO.cpp, memory was allocated in initSIFOFilters() with functions like xGet_mem3Ddouble(). Such memory is not released. Moreover, no memory free functions related to xGet_memxDdouble() were provided.

In TEncAdaptiveLoopFilter.cpp, if "if(init == 0)" and "init == 0" are searched, several improper memory allocation can be noticed, where memory is allocated to static local pointers when the related function is called for the first time. Clearly, such memory is not released.

It is highly suggested that the proponents for SIFO and AdaptiveLoopFilter also check with other config files before submiting the patch for the memory leak.

Attachments (2)

encoder_lowdelay.cfg (5.6 KB) - added by li@… 14 years ago.
MemLeak_SIFO.patch (3.3 KB) - added by anonymous 14 years ago.

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by li@…

Changed 14 years ago by anonymous

comment:1 Changed 14 years ago by li@…

To fix the memory leak in TEncSIFO.cpp, please
1, apply the attached patch (MemLeak_SIFO.patch) on TEncSIFO.h and TEncSIFO.cpp
2, add "m_cSIFOEncoder.destropy();" as the first line in function Void TEncTop::destroy ().

Regarding to the memory leak in TEncAdaptiveLoopFilter.cpp, it is a bit complicated since they used same names for static local pointers. I think it is better to wait a patch from its author.

comment:2 Changed 14 years ago by fbossen

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r253

comment:3 Changed 12 years ago by davidf

  • Component set to HM

Updating component after adding WD (Text) tickets

comment:4 Changed 12 years ago by davidf

  • Cc fbossen ksuehring davidf added

comment:5 Changed 12 years ago by davidf

  • Cc jct-vc@… added
Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber, Participant

  • David Flynn(Subscriber, Participant)
  • Frank Bossen(Subscriber, Participant)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Always)
  • li@…(Reporter, Participant)