Quality RTOS & Embedded Software

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


Free RTOS heap usage

Posted by omermiranda on October 27, 2016

HI, I am using free rtos on STM32 M0 controller. I have defined configTOTALHEAPSIZE ( ( size_t ) ( 6500 ) ). I have created 4 task with 128 bytes stack each, 2 queues of length 10 and 2 mutexs. I want to know the heap used for this configurations. So I used the function xPortGetFreeHeapSize(). But this function returns 2924 value. I am a little confused as to how iam consuming (6500 - 2924 = 3576) Can anyone please explain? Thanks!

Free RTOS heap usage

Posted by omermiranda on October 27, 2016

Hi, To add to the above, I am using heap_4.

Free RTOS heap usage

Posted by rtel on October 27, 2016

I would expect there to be approximately 5K remaining - minus however much storage the queues are using. You say the queues or of length 10, but 10 what? 10 bytes?

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

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

Latest News

Version 10.1.0 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.


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


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