Quality RTOS & Embedded Software

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




Loading

problem with the `free` function

Posted by bou6 on July 20, 2016

I believe that using malloc and free in small embedded system is a bad habit, although am using them for very specific circumstances.

so i'am using 2 tasks in my application : LCDTask and SerialTask: -The 2 tasks have the same priority. - lcdSTACKSIZE configMINIMALSTACKSIZE + 1000. - serialSTACKSIZE configMINIMALSTACKSIZE - the pointer that am allocating/ freeing pointes to data with 200 bytes - lcdTask allocate and free the pointer . - the serial task doesn't acces to the heap, no dynamic allocation. If i run only the lcdtask no problem but if i add the serialTask the program crashes when meeting free function but why (the serial task doesn't acces to the heap).

You know debugging the free function is difficult since it doesn't return. Could you please help me find roads to find the source of the problem


problem with the `free` function

Posted by edwards3 on July 20, 2016

Have you seen this page? http://www.freertos.org/a00111.html

Attachments

alternate (1486 bytes)

problem with the `free` function

Posted by bou6 on July 20, 2016

Ok Thank you for the reference

Attachments

alternate (1486 bytes)


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




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

Latest News

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


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