Quality RTOS & Embedded Software

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


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?

* 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.



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


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

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

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo, Nuvoton Cortex-M23 demo & STM32H745 dual core (AMP) demo.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

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

Xilinx Microblaze and Zynq partner