FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [December 2016 Threads] 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|