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




Loading

how big configTOTAL_HEAP_SIZE?

Posted by Nobody/Anonymous on February 26, 2007
How big should this value be set to?

If i would be to create a fully freeRTOS application with only the memory allocation macro's, could i set this value to the amount of RAM that the uC has?

For example, the AVR demo has this value as 1500 bytes, but the mega323 has 2048 bytes of RAM. So i wonder, where do the other 548 bytes go to? Does the kernel itself? Or can i only use that 548 bytes (the avr example) with traditional malloc() type of functions?

Futhermore, how can i find out the amount of ram used by the scheduler, queue management, tasks individually? Like the arm7 example, the docs only say it's far less on 8 bit platforms, but does not say how much less :) I'm a bit mystified here sadly

Thanks in advance

RE: how big configTOTAL_HEAP_SIZE?

Posted by Nobody/Anonymous on February 26, 2007
The memory allocated using configTOTAL_HEAP_SIZE is used by the kernel to create tasks and queues. In addition to this you need RAM for static variables, the stack used by main(), global variables, etc. configTOTAL_HEAP_SIZE cannot therefore take up all the RAM otherwise your application will not link.

Once you have created all your tasks and queues you can look at the amount of heap that is left. If there is any left you can reduce configTOTAL_HEAP_SIZE. This is normally easier than trying to calculate how big it should be in advance.


[ 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