Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

More Info for vApplicationMallocFailedHook

Posted by Freddy Gomez on 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




RE: More Info for vApplicationMallocFailedHook

Posted by Dave on 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.

RE: More Info for vApplicationMallocFailedHook

Posted by Freddy Gomez on 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.


More Info for vApplicationMallocFailedHook

Posted by iweindesmedt on April 28, 2017

+1


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS