Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

malloc to separate memory regions

Posted 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 regions

Posted 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 regions

Posted 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/ >


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


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner