Hello community,
We are using DM8168 with EZSDK 5.04.00.11. Using sys_top we have recently observed a memory leak in the heap of shared region 0 in both HDVICP2 and HDVPSS. After some test and debugging we nailed down the problem to 2 functions: OMX_Init() and OMX_Deinit(), i.e. a trivial piece of code such as:
int main(int argc, char* argv[])
{
OMX_Init();
OMX_Deinit();
return 0;
}
produces 640 bytes leak each time it is executed (please find attached logs before and after executing the above mentioned code 1 and 10 times). Note, that both functions return OMX_ErrorNone.
Our software needs to be restarted (thus consecutive OMX_Init/Deinit) without rebooting the entire board.
Is the a patch or correction available?
LOGS:
before calling the above mentioned code (board freshly rebooted):
sys_top Ver : 0.2.0.0
Number Of Running Cores: 3
DSP :
Not Running or Do not integrate sys_top functionality
MC.HDVICP2:
Firmware Version: 05_02_00_38
0 Heap:Size 1048576 Used 171752 MaxU 171752 Free 876824 LarF 876824
Num SR :4
SRIn 0 :PhyA 0x9f700000 Virt 0x0 Size 0x200000
SRHeap:Size 2095488 Used 26752 MaxU 26752 Free 2068736 LarF 2068736
SRIn 1 :PhyA 0x9a100000 Virt 0x0 Size 0x100000
SRHeap:Size 1048448 Used 0 MaxU 0 Free 1048448 LarF 1048448
SRIn 2 :PhyA 0xab000000 Virt 0x0 Size 0xbc00000
SRHeap:Size 197132160 Used 0 MaxU 0 Free 197132160 LarF 197132160
MC.HDVPSS:
Firmware Version: 05_02_00_38
0 Heap:Size 2097152 Used 119888 MaxU 119888 Free 1977264 LarF 1977264
1 Heap:Size 28311552 Used 0 MaxU 0 Free 28311552 LarF 28311552
Num SR :4
SRIn 0 :PhyA 0x9f700000 Virt 0x0 Size 0x200000
SRHeap:Size 2095488 Used 26752 MaxU 26752 Free 2068736 LarF 2068736
SRIn 1 :PhyA 0x9a100000 Virt 0x0 Size 0x100000
SRHeap:Size 1048448 Used 0 MaxU 0 Free 1048448 LarF 1048448
SRIn 2 :PhyA 0xab000000 Virt 0x0 Size 0xbc00000
SRHeap:Size 197132160 Used 0 MaxU 0 Free 197132160 LarF 197132160
After calling the code 1 time --> 640 bytes leak
sys_top Ver : 0.2.0.0
Number Of Running Cores: 3
DSP :
Not Running or Do not integrate sys_top functionality
MC.HDVICP2:
Firmware Version: 05_02_00_38
0 Heap:Size 1048576 Used 171752 MaxU 171752 Free 876824 LarF 876824
Num SR :4
SRIn 0 :PhyA 0x9f700000 Virt 0x0 Size 0x200000
SRHeap:Size 2095488 Used 27392 MaxU 27392 Free 2068096 LarF 2067328
SRIn 1 :PhyA 0x9a100000 Virt 0x0 Size 0x100000
SRHeap:Size 1048448 Used 0 MaxU 0 Free 1048448 LarF 1048448
SRIn 2 :PhyA 0xab000000 Virt 0x0 Size 0xbc00000
SRHeap:Size 197132160 Used 0 MaxU 0 Free 197132160 LarF 197132160
MC.HDVPSS:
Firmware Version: 05_02_00_38
0 Heap:Size 2097152 Used 119888 MaxU 119888 Free 1977264 LarF 1977264
1 Heap:Size 28311552 Used 0 MaxU 0 Free 28311552 LarF 28311552
Num SR :4
SRIn 0 :PhyA 0x9f700000 Virt 0x0 Size 0x200000
SRHeap:Size 2095488 Used 27392 MaxU 27392 Free 2068096 LarF 2067328
SRIn 1 :PhyA 0x9a100000 Virt 0x0 Size 0x100000
SRHeap:Size 1048448 Used 0 MaxU 0 Free 1048448 LarF 1048448
SRIn 2 :PhyA 0xab000000 Virt 0x0 Size 0xbc00000
SRHeap:Size 197132160 Used 0 MaxU 0 Free 197132160 LarF 197132160
after executing the code 10 times --> 6400 bytes leak
sys_top Ver : 0.2.0.0
Number Of Running Cores: 3
DSP :
Not Running or Do not integrate sys_top functionality
MC.HDVICP2:
Firmware Version: 05_02_00_38
0 Heap:Size 1048576 Used 171752 MaxU 171752 Free 876824 LarF 876824
Num SR :4
SRIn 0 :PhyA 0x9f700000 Virt 0x0 Size 0x200000
SRHeap:Size 2095488 Used 33152 MaxU 33152 Free 2062336 LarF 2055808
SRIn 1 :PhyA 0x9a100000 Virt 0x0 Size 0x100000
SRHeap:Size 1048448 Used 0 MaxU 0 Free 1048448 LarF 1048448
SRIn 2 :PhyA 0xab000000 Virt 0x0 Size 0xbc00000
SRHeap:Size 197132160 Used 0 MaxU 0 Free 197132160 LarF 197132160
MC.HDVPSS:
Firmware Version: 05_02_00_38
0 Heap:Size 2097152 Used 119888 MaxU 119888 Free 1977264 LarF 1977264
1 Heap:Size 28311552 Used 0 MaxU 0 Free 28311552 LarF 28311552
Num SR :4
SRIn 0 :PhyA 0x9f700000 Virt 0x0 Size 0x200000
SRHeap:Size 2095488 Used 33152 MaxU 33152 Free 2062336 LarF 2055808
SRIn 1 :PhyA 0x9a100000 Virt 0x0 Size 0x100000
SRHeap:Size 1048448 Used 0 MaxU 0 Free 1048448 LarF 1048448
SRIn 2 :PhyA 0xab000000 Virt 0x0 Size 0xbc00000
SRHeap:Size 197132160 Used 0 MaxU 0 Free 197132160 LarF 197132160
rg