Free RTOS RAM Allocation for Task over flowing

nikhilt007 wrote on Thursday, June 27, 2019:

Hi,
I am using RL78 micro controller with RAM 8kb and i ported it to free rtos
but my ram usage is already around 7.2k so when Iam adding free rtos foot print it
need some 1500k of RAM to Run all Task .

my question is is there is any way to reduce RAM usage by each task

or If I use proto thread in free rtos can we able to run all with enough memory

Regards,
Nikhil

nikhilt007 wrote on Thursday, June 27, 2019:

Hi,
sorry there is some corruption
minimum RAM need for free RTOS port(ie Heap size in freeRTOS config file) to run all my task is
1500 bytes ie 1.5k

rtel wrote on Thursday, June 27, 2019:

There is some FAQ information on RAM usage here:
https://www.freertos.org/FAQMem.html - also look at how you dimension
and optimise the heap here: https://www.freertos.org/a00111.html

Co-rouines are an option but note they are not maintained any more over
and above running some co-routine tests in the Visual Studio projects.

Also not that the kernel itself uses very little memory - most of the
memory goes to the stacks allocated to the tasks - and how much stack
space is used in not a function of the RTOS but the compiler, compiler
optimisation, function call depth, number of variables allocated on the
stack, etc. just as per any C program be that multithreaded or not.