Re:Toit – A Language Designed for Microcontrollers
by floitsch on Wednesday June 08, 2022 @03:26PM
(#31672715)
In big parts that's true, but there are some good arguments in favor of a GC for these small devices:
- the GC is a sliding compacting GC. As such there is no fragmentation for heap-allocated memory.
- the memory on these devices is tiny. The GC thus doesn't take long time.
- the ESP32 has really good peripherals, making timing sensitive operations very rare. In most cases there is a hardware module that does the job for you. The timing requirements then usually become significant less important.
- the GC is a sliding compacting GC. As such there is no fragmentation for heap-allocated memory.
- the memory on these devices is tiny. The GC thus doesn't take long time.
- the ESP32 has really good peripherals, making timing sensitive operations very rare. In most cases there is a hardware module that does the job for you. The timing requirements then usually become significant less important.