-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
mem: singleSegmentArena allocates more than required #123
Labels
Comments
Good catch! Mind sending a PR? |
thsnr
added a commit
to thsnr/go-capnproto2
that referenced
this issue
Oct 4, 2018
zombiezen
pushed a commit
that referenced
this issue
Oct 4, 2018
Added Tiit Pikma to A+C. Fixes #123
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I am reading the source code correctly, then
singleSegmentArena.Allocate
allocates more memory than necessary. mem.go shows thatnextAlloc
is invoked with the length ofdata
, but should be the capacity. Otherwise it is overallocating bycap(data)-len(data)
bytes.Not a big deal, just something that caught my eye.
The text was updated successfully, but these errors were encountered: