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?
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.
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/ >