We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text was updated successfully, but these errors were encountered:
See also #466
Sorry, something went wrong.
So I think there's a fundamental problem with the way the connection layer provides memory back to the application.
We currently have to:
Instead, we should try to allocate that message once, and use indices and carefully replace delimiters with null terminators.
For example to consume the message:
struct message { unsigned char* buffer; uint32_t buffer_len; // length of the entire buffer uint32_t payload_idx; // index of the actual payload contents }
This struct is much more efficient to pass around, and other structs can consume it, copying just the indices rather than the whole buffer contents.
Buffer is still a pointer to the start of memory allocation, so it can still be used to free at the end.
To get the actual payload contents for example, the address for it would be buffer + payload_idx.
buffer + payload_idx
XavierChanth
No branches or pull requests
The text was updated successfully, but these errors were encountered: