Closed ryan-summers closed 1 year ago
Another idea that we could do is have the user provide a single buffer during the Config
builder. Then, when we want to serialize the will, we split the buffer to take part of it for the will.
Then, when we go to make RX/TX buffers, we can split the remainder down the middle to create the RX/TX buffers. This way. the user just has to give us a single chunk of memory that we use for everything.
We could even expose configuration features in Config
to let the user specify the min/max RX/TX buffer sizes if we wanted.
I spawned #146 to refactor, seems a bit of a bigger change than this PR was intending.
This PR refactors the
will
temporary storage such that thewill
is serialized at configuration time into a user-provided buffer. This means that theWill
message itself does not need to live very long.Pros and Cons: