More Info for vApplicationMallocFailedHook

gcfreddy wrote on Thursday, October 14, 2010:

Hi everybody,

This is just a suggestion for the FREERTOS:

Could the size of the requested memory chunk be passed as argument to this function?

Rationale:
* It is better than void argument.

My motivation to post his suggestion is that a bug in my application cause the pvPortMalloc function be called with a higher value. In my case the value is directly related to the content of a file and the file (hand made for a test)  was wrong. So the argument in the malloc failed hook would be helped me.

May be someone could share more examples of the usage of the argument in the malloc failed hook.

Regards

-Fred

davedoors wrote on Friday, October 15, 2010:

I don’t think the prototype of the hook function should be changed because that would break a lot of peoples code. You can put a break point in the function, then if it gets hit, step out of the function and inspect all the variables in a debugger though.

gcfreddy wrote on Friday, October 15, 2010:

Certainly we don’t want code breaks, thanks for the comment.

I’ve been using the breakpoint method for a while. But in a alpha or beta release it cannot be done because of the debugger.

However, It could be done by allowing the user to select (by FREERTOSConfig.h) between the current implementation of the hook and the alternative option.

Again, It was just a suggestion.

iweindesmedt wrote on Friday, April 28, 2017:

+1