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.

If Memory_alloc fails, how to prevent error from being raised?

Other Parts Discussed in Thread: SYSBIOS

Hi,

 I am using "tirtos_tivac_2_00_01_23" and CCS6. Now I defined a HeapMem in .cfg file, and when Memory_alloc fails (not enough memory for example), I don't want an error to be erased (print some error message and terminate the program). Instead, I think this is normal and my code will deal with it.

 I have read some threads also regarding this, and the idea usually is to modify global assert or error handling policy. This is not what I want, because I want to keep assert and error handling woking as what they are now on other code. I simply want to suspend the error in calling Memory_alloc and Memory_free, that is, I need a seperate error policy for Memory management.

  Is there any idea? Thank you very much.

Currently my error module settings are:

Error hook: ti.sysbios.BIOS.errorRaiseHook

Max error nesting: 16

Error policy: UNWIND

Error policy hook: xdc.runtime.Error.policyDefault

Logger: null