Quality RTOS & Embedded Software

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


Loading

Stack or Heap or something else

Posted by Torben on April 25, 2007
Hi!

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?

Thx!

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.

Regards.

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

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