Quality RTOS & Embedded Software

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


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


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

Latest News

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

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

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


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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