This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/IWR6843: Memory leak dpm module MMWAVE_SDK 3.1.1.2

Part Number: IWR6843

Tool/software: TI-RTOS

Hi,

In the DPM module the semaphore ptrDPM->semaphoreHandle is used, it is created and used, but never deleted. This leads to a significant memory leak when initializing and de-initializing the DPM module repetitively.

My fix is to add in dpm_core.c in the function DPM_deinit:

/* Clear up the created semaphore */
if (ptrDPM->semaphoreHandle != NULL) {
    SemaphoreP_delete(ptrDPM->semaphoreHandle);
}

Just before the existing lines:

/* Cleanup the memory allocated for the DPM Module: */
MemoryP_ctrlFree (ptrDPM, sizeof(DPM_MCB));

Do not forget to rebuild the DPM library, as it is include as prebuild libary into MMWave projects.

Kind regards,

Sjors