Skip to content
New issue

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

DemuxArena should use the same arena implementation as the source #98

Open
recht opened this issue Oct 5, 2017 · 1 comment
Open

DemuxArena should use the same arena implementation as the source #98

recht opened this issue Oct 5, 2017 · 1 comment
Labels

Comments

@recht
Copy link

recht commented Oct 5, 2017

If you marshal a SingleSegment and unmarshal it again, you get a MultiSegment. If you then start writing to that then you get several segments instead of using a single segment.

I can see why this can be tricky since the sender and the receiver might be different systems, but it is somwhat surprising. Especially given #97.

@zombiezen
Copy link
Contributor

So when I was evaluating this (I did make a conscious decision to do this), my rationale was getting a different arena allocator based on the number of segments seemed surprising, and that if this control was needed, then the application code could do it. Admittedly, I don't expose the header parsing yet, but I feel much better about the current parse function than previous iterations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants