Part Number: TDA3
Tool/software: TI-RTOS
Hi,I come across some problems with Utils_memAlloc() function.I want to alloc all my space on L2SRAM,
[DSP2 ] 35.259501 s: SYSTEM: Heap = LOCAL_L2 @ 0x00800000, Total size = 227264 B (221 KB), Free size = 227264 B (221 KB)
which is float * outputtmp1 = (float*)Utils_memAlloc(UTILS_HEAPID_L2_LOCAL,input1_mat->cols*2*input1_mat->rows*sizeof(float),8);
I find out that the system will open space where there already been alloced(I do not free it)
For example:
[DSP2 ] 35.358872 s: z.data_pt is 800000
[DSP2 ] 35.358903 s: z_ipl.data_pt is 800800
[DSP2 ] 35.359391 s: tracker_pt->tmpl.data_pt is 801000
[DSP2 ] 35.359635 s: tracker_pt->hann.data_pt is 803000
[DSP2 ] 35.359665 s: hann1t.data_pt is 805000
[DSP2 ] 35.359696 s: hann2t.data_pt is 805080
[DSP2 ] 35.359726 s: hann2d.data_pt is 805180
[DSP2 ] 35.360153 s: tracker_pt->prob.data_pt is 800000
[DSP2 ] 35.360641 s: outputtmp2 in createGaussianPeak is 804000
before alloc tracker_pt->prob.data_pt, I free z.data_pt and z_ipl.data_pt, but I do not free tracker_pt->tmpl.data_pt and tracker_pt->hann.data_pt .So when I alloc tracker_pt->prob.data_pt,the data in tracker_pt->tmpl.data_pt is gone.How does it happen?
Firstly I think there is enough space for the heap because after that there is:output2 in GuassCorrelation is 820000.Secondly,I use UTILS_HEAPID_DDR_CACHED_LOCAL replace UTILS_HEAPID_L2_LOCAL,it goes perfectly.So I do not think there exits memory leak.
Thanks
Chen