Unofficial Hacker News companion — get notified on comment replies, and more.

The state of Rust allocators in 2026: stabilised (opens external site)

219 points by fanf2 4 days ago | cetra3.github.io | 90 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (1)

  1. It's indeed extremely useful to define custom allocators for embedded programs, since you don't usually have a flat memory layout where it doesn't matter where you put stuff, for example you may need an allocator that allocates normal RAM, RAM with DMA capability, RAM in an external SPI PSRAM chip, etc. For example a display buffer that needs to be sent trough DMA to a SPI LCD needs to be allocated in DMA capable memory, but that is limited and you don't want to use that for everything, a buffer used for logging purposes can be well allocated to external PSRAM chip, etc.

    That is the reason why in embedded C (and sometime C++) still are the most used languages, because being able to control the allocation of the memory is very important.