On 4/6/26 00:13, Michael Balzer wrote:
a) Rework microRL's `microrl_get_complite()` and `new_line_handler()` to use the heap instead of the stack for the token arrays (and make sure the SPIRAM heap is used if available).
Could you please point me to existing code that uses the heap in the way you suggest? I found some esp documentation: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/sy... When external RAM is enabled, external SPI RAM can be allocated using standard malloc calls, or via heap_caps_malloc(MALLOC_CAP_SPIRAM), depending on the configuration. See Configuring External RAM for more details. I also see the call to heap_caps_malloc() in components/zip/zlib/zutil.c: voidpf ZLIB_INTERNAL zcalloc (opaque, items, size) voidpf opaque; unsigned items; unsigned size; { (void)opaque; void* ret = heap_caps_malloc(items * size, MALLOC_CAP_SPIRAM); if (ret) return ret; else return malloc(items * size); } Is using calloc/malloc/realloc good enough? Craig