Currently heap_buffer always takes up the full size on heap, even when it's not used. It could be changed to utilize Vecs or Boxes with a max size, which will grow to but not always hold that many bytes in memory. https://crates.io/crates/heapless could be added as a tracing dependency to access a Vec interface when allocation is both in and out of play. The performance or utility difference may not justify the extra dependency.
Currently
heap_bufferalways takes up the full size on heap, even when it's not used. It could be changed to utilize Vecs or Boxes with a max size, which will grow to but not always hold that many bytes in memory. https://crates.io/crates/heapless could be added as atracingdependency to access a Vec interface when allocation is both in and out of play. The performance or utility difference may not justify the extra dependency.