Quality RTOS & Embedded Software

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


Loading

How to measure memory in run time

Posted by Bill Yang on March 17, 2010
Hi,

Re: FreeRTOS v5.03 + uIP + Web Server

I have a question regarding the heap2 memory measurement in run time. I am suspecting my project has memory issue. The project has implemented a web server with uIP TCP stack that sometimes ran quickly to respond the request from web browse, but sometimes it stuck took longer to responding or timeout. Then I have to recycle the system power to restart.

I know the xPortGetFreeHeapSize() function call can measure memory size, but I wonder when and where it should be called in run time to measure the heap over size or not. Does it need to create a task for measuring? Any suggestion will be welcome.

By the way, I used heap2 with MAX size 24000 in definition.

Thanks,
Bill

RE: How to measure memory in run time

Posted by Dave on March 18, 2010
You can call it from anywhere that is not inside an interrupt. It will show you the total free heap available but doesn't give you information on how the heap is fragmented.

RE: How to measure memory in run time

Posted by Bill Yang on March 18, 2010
Thanks Dave. If I need to learn how the heap fragmentation was, do you have ideal what function to be called?

Bill


[ 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