I'm writing a small program for a 328P based microcontroller, which has 8-bit registers, and i think it uses a 16-bit pointer size, but when i tried to create a FBA, the compiler complains about this pointer size, as seen in fig.1.
var alloc_data: [100]u8 = undefined;
pub fn main() !void {
var fba = std.heap.FixedBufferAllocator.init(&alloc_data);
const alloc = fba.allocator();
_ = alloc;
}
The allocator is used to temporarily store formatted strings to display via uart and an LCD right after, which has a limited character length, so FBA is a good choice for this.
Is there a built-in allocator that would work for this use case? Otherwise, is there a recommended 3rd party allocator that would work?
0.10 is used instead of 0.11 or master because of issue #16417.