Quality RTOS & Embedded Software

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




Loading

Hang on pvPortMalloc()

Posted by conkerkh on December 20, 2016

My application is crashing on pvPortMalloc at > configASSERT( ( ( ( sizet ) pxNewBlockLink ) & portBYTEALIGNMENTMASK ) == 0 ); I double checked and there is still availble heap to allocate from, hwoever for some reason everything hangs at mentioned assert. I'm using heap4 alloc scheme. Are there any particular reasons why this might be happening?


Hang on pvPortMalloc()

Posted by hs2sf on December 20, 2016

This assert doesn't check for an exhausted heap, it checks that your allocator satisfies the alignment requirement of the processor achitecture used. You should check check portmacro.h::portBYTEALIGNMENT and the resulting portable.h::portBYTEALIGNMENT_MASK vs. your allocator implementation.


Hang on pvPortMalloc()

Posted by conkerkh on December 20, 2016

I've checked it and it's correct, I would assume in this case that newBlock (this is inside condition that splits blocks) is not aligned properly this condition occurs after several calls to pvPortMalloc. First few calls are ok but later on it hangs. To be honest I have no idea what's going on. I would avoid using dynamic allocation but I have no other options in this case... Any ideas where to go next?


Hang on pvPortMalloc()

Posted by bowerymarc on December 20, 2016

make sure you’re not calling from an ISR (including timerTick)

On Dec 20, 2016, at 2:09 PMEST, Chris conkerkh@users.sf.net wrote:

I've checked it and it's correct, I would assume in this case that newBlock (this is inside condition that splits blocks) is not aligned properly this condition occurs after several calls to pvPortMalloc. First few calls are ok but later on it hangs. To be honest I have no idea what's going on. I would avoid using dynamic allocation but I have no other options in this case... Any ideas where to go next?

Hang on pvPortMalloc() https://sourceforge.net/p/freertos/discussion/382005/thread/ba211d48/?limit=25#29a7 Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/ https://sourceforge.net/p/freertos/discussion/382005/ To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions/


Hang on pvPortMalloc()

Posted by conkerkh on December 21, 2016

I examined memory and turns out there was memory leak after writing to previously allocated memory. Which was the result of misalignment. Anyway thanks for help:)


Hang on pvPortMalloc()

Posted by hemant2007 on February 1, 2017

Hello Chris, I am having same problem that you described. How you have got rid of this ? How to find memory leak? How/why misalignment is created?


Hang on pvPortMalloc()

Posted by rtel on February 1, 2017

You can track memory allocations and frees using the FreeRTOS+Trace tool.


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists