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] [August 2014 Threads]
Hello,
I notice that if I allocate 6 bytes using pvPortMalloc(6), FreeRTOS+Trace shows me that the kernel allocated 16 bytes and not 6, I tried different values but FreeRTOS+Traces always shows me different values than the ones I put in my code and with no pattern between them.
I'm not sure if this is normal or it is freeRTOS+Trace who shows wronge values.
I checked the value passed to pvPortMalloc( size_t xWantedSize )
and the definition of sizet is :
typedef __SIZETYPE__ size_t; /* type yielded by sizeof */
I'm using PIC32, and i'm not sure if size_t will be considered as int32 or int8.
Thank you.
Take a look at the heap code and you’ll understand why there’s a difference.
On Aug 25, 2014, at 9:03 AMEDT, Hicham chaabanemalki@users.sf.net wrote:
Hello,
I notice that if I allocate 6 bytes using pvPortMalloc(6), FreeRTOS+Trace shows me that the kernel allocated 16 bytes and not 6, I tried different values but FreeRTOS+Traces always shows me different values than the ones I put in my code and with no pattern between them.
I'm not sure if this is normal or it is freeRTOS+Trace who shows wronge values.
I checked the value passed to pvPortMalloc( size_t xWantedSize )
and the definition of sizet is :
typedef SIZETYPE size_t; / type yielded by sizeof /
I'm using PIC32, and i'm not sure if size_t will be considered as int32 or int8.
Thank you.
pvPortMalloc() allocates extra bytes
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
/* The wanted size is increased so it can contain a BlockLink_t
structure in addition to the requested amount of bytes. */
got it ;). I should take these 10 extra bytes in consideration when calculating the heap worst case scenario.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.