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] [September 2016 Threads] malloc to separate memory regionsPosted by logicanalyzer on September 16, 2016 I have different classes of memory, (faster, slower, nearby, farther away) and I would like to control where malloc allocates memory. The heap_5 scheme allows the heap to span multiple non-contiguous memory regions but treats them as a single heap.
I need separate heaps and a way to control which one malloc allocates from. Is there a straightforward way to do this, or do I need to write heap_6.c?
malloc to separate memory regionsPosted by rtel on September 16, 2016 I think there might be a change request on this topic already. Basically it is not a straight forward change because it would need a new parameter to the pvPortMalloc() function, and that would have lots of backward compatibility issues. However, you can have more than one memory allocator in your application - so the FreeRTOS code would call the 'standard' pvPortMalloc(), and your application can call whichever memory allocation function is most appropriate for the memory being allocated.
malloc to separate memory regionsPosted by dumarjo on September 16, 2016 Hi,
This is how we do it.
Jonathan
Le 16/09/2016 à 14:20, Real Time Engineers ltd. a écrit :
>
> I think there might be a change request on this topic already.
> Basically it is not a straight forward change because it would need a
> new parameter to the pvPortMalloc() function, and that would have lots
> of backward compatibility issues. However, you can have more than one
> memory allocator in your application - so the FreeRTOS code would call
> the 'standard' pvPortMalloc(), and your application can call whichever
> memory allocation function is most appropriate for the memory being
> allocated.
>
> ------------------------------------------------------------------------
>
> malloc to separate memory regions
> https://sourceforge.net/p/freertos/discussion/382005/thread/65d41896/?limit=25#c823
>
> ------------------------------------------------------------------------
>
> 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/
>
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|