Quality RTOS & Embedded Software

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


Stack or Heap or something else

Posted by Torben on April 25, 2007

I want to use a char[2000] in a task. Now I am wondering if I have to set the stack size or the heap size +2000, so there are no memory problems.

Another question: Is there a possibility to see the heap address?


RE: Stack or Heap or something else

Posted by Richard on April 25, 2007
If you really need the array to be on the stack then the stack size will have to be increased to accommodate it. If only one task is going to access the array, or there is some sort of mutual exclusion mechanism to ensure consistent access, then the array can be declared static - which will prevent it being allocated on the stack.


RE: Stack or Heap or something else

Posted by Torben on April 25, 2007
Thx for your answer. I am now using the array as a global array in a task which means it does not occupy stack or heap space, so everything should be fine.

[ 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