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 ]    [ Sitemap ]    [ ]




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

Latest News

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.

Video: Watch James Gosling & Richard Barry at re:Invent, Las Vegas 2017.

New FAQ page about the FreeRTOS kernel and Amazon FreeRTOS.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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