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

[io-2] Bytes#append makes limits array too big #89

Closed
pull-vert opened this issue Jan 18, 2020 · 1 comment
Closed

[io-2] Bytes#append makes limits array too big #89

pull-vert opened this issue Jan 18, 2020 · 1 comment

Comments

@pull-vert
Copy link

pull-vert commented Jan 18, 2020

In Bytes#append function, limits seems to grow too big.
This is current code with a comment that shows the problem

if (tail == buffers.size) {
    buffers = buffers.copyInto(arrayOfNulls(buffers.size * 2))
    // buffers has now a size = 2 * old size
    limits = limits.copyInto(IntArray(buffers.size * 2))
    // FIXME incorrect ! here limits size = 2 * new buffer size = 4 * old buffer size
    // should be equal to new buffer size
}
@fzhinkin
Copy link
Collaborator

We're rebooting the kotlinx-io development (see #131), all issues related to the previous versions will be closed. Consider reopening it if the issue remains (or the feature is still missing) in a new version.

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

No branches or pull requests

2 participants