[SOLVED]add support to split heap in multiple ranges

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

[SOLVED]add support to split heap in multiple ranges

Post by jickster » Thu May 03, 2018 8:34 pm

https://github.com/micropython/micropython/issues/3758

In current gc initialization, it is only possible to provide one range for the heap.

However, all the RAM available on a micro-controller might not be in a contiguous range because there might be different types of RAM: SRAM, SDRAM, SPI-RAM, peripheral-dedicated RAM etc.

In my particular case, there is 4K of RAM that is used by a certain peripheral but only if it's enabled but otherwise, it's free for general-purpose use.
Unfortunately, 4K is too small for (most of) my uses as a heap by itself but if I could append it to my main heap, I wouldn't be letting 4K of RAM go to waste.

What do you think?
Last edited by jickster on Mon May 07, 2018 6:26 pm, edited 1 time in total.

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: add support to split heap in multiple ranges

Post by jickster » Mon May 07, 2018 6:26 pm


Post Reply