Other Parts Discussed in Thread: TMS320C5515
Hi,
I am using BUF_alloc to allocate the memory. I have created 4 -- 8Bytes buffer, 2-- 16bytes buffer, 4 -- 32bytes buffer, 2-- 128bytes buffer, 2-- 260bytes buffer. Once the memory gets allocated of different size, when tried to free the memory using BUF_free and passing the ptr, and checking the following condition using if statement, the control enters FXN_F_selfloop and never comes out of first if statement.
if( (BUF_free( &BUF_8B, ptr ) ) )
{
}
else if( BUF_free( &BUF_16B , ptr) )
{
}
else if( BUF_free(&BUF_32B , ptr) )
{
}
else if( BUF_free(&BUF_128B , ptr) )
{
}
else if( BUF_free(&BUF_256B , ptr) )
{
}
But the memory gets freed when I tried to test only allocating and freeing the memory by creating a new project. i.e I created the same buffers as above mentioned, and first allocated 8bytes of buffer and caught the returned pointer as buf1, second I allocated 4bytes of buffer and caught the pointer as buf2, and later for freeing the memory I passed buf2 pointer first then buf1. The memory got freed successfully.
When many modules are integrated together, the above condition fails. Can someone please help me out with this?
Regards,
Taranum