Quality RTOS & Embedded Software

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


Freertos Heap adjust in RX62N

Posted by neona-embedded on July 28, 2015

We are trying to reduce the freertos heapsize in Renesas RX62N. Default heap size is 45K. We are using heap_2.c. When we reduce heap size to 2K, the code is getting stuck at vApplicationMallocFailedHook(). Can anyone help in solving this issue?

Freertos Heap adjust in RX62N

Posted by davedoors on July 28, 2015

How much heap do you need? It seems more than 2K. Set the heap larger than you need, alocate all the objects you need, then call xPortGetFreeHeapSize() to see how much is left. You can then set configTOTALHEAPSIZE to exactly what is needed.

If you use heap2 (heap4 is normal now) and nothing calls malloc then make sure you dont also allocate a C heap as it wont be used. The size of the C heap is normally set in a linker script.

Freertos Heap adjust in RX62N

Posted by neona-embedded on July 29, 2015

Thankyou for the reply. We are using heap2.c. We have read in some forums that we can set configTOTALHEAPSIZE 0 since heap2.c is not using heap memory. But if we set 0, vApplicationMallocFailedHook() is coming. Can we avoid this? We can give maximum 15K heap memory. We have 4 tasks. But then also this error was there.

Freertos Heap adjust in RX62N

Posted by rtel on July 29, 2015

You cannot set that constant to 0 if you are using heep2, only if you are using heep3. You have the source code for the heap implementations so you can see why very quickly. Please also read the memory management pages on the FreeRTOS.org site. Regards.

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

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists