diff --git a/ports/sh/main.c b/ports/sh/main.c index 227ff1744..3e221096d 100644 --- a/ports/sh/main.c +++ b/ports/sh/main.c @@ -74,6 +74,14 @@ int main(int argc, char **argv) /* Initialize MicroPython */ mp_stack_ctrl_init(); gc_init(heap, heap + sizeof(heap)); + // TODO: gc_add(start, end) for each area we want to allocate to + // fx-9860G III: + // * (nothing? x_x) + // fx-CG 50: + // * The entirety of _uram + // * The entirety of the extra VRAM + // * Possibly memory past 2M + // * (keep the OS heap for normal malloc()) mp_init(); // Start a normal REPL; will exit when ctrl-D is entered on a blank line. diff --git a/ports/sh/mpconfigport.h b/ports/sh/mpconfigport.h index 5c72910fb..bddb2e9a2 100644 --- a/ports/sh/mpconfigport.h +++ b/ports/sh/mpconfigport.h @@ -8,6 +8,7 @@ /* Main features */ #define MICROPY_ENABLE_COMPILER (1) #define MICROPY_ENABLE_GC (1) +#define MICROPY_GC_SPLIT_HEAP (1) #define MP_ENDIANNESS_BIG (1) #define MICROPY_READER_POSIX (1) #define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED)