-
Notifications
You must be signed in to change notification settings - Fork 745
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
fix: overestimating memory size in buffer #6438
base: master
Are you sure you want to change the base?
Conversation
let slice1 = arr.slice(0, 64); | ||
let slice2 = arr.slice(64, 64); | ||
|
||
// both slices report the full buffer memory usage, even though the buffers are shared |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because current slice1 and sclic2 not return full buffer memory usage, so delete it.
This is changing what these methods report to something else that I'm not sure is correct. Whilst this formulation may benefit your use-case, there are common situations where it will now under report... Perhaps you might file a ticket to discuss a memory tracking approach that better handles shared buffers, as that is the actual issue here. This is not a bug |
Convert to draft while we discuss the options |
Which issue does this PR close?
Closes #6363
Rationale for this change
see #6363 (comment)
What changes are included in this PR?
change the capacity function in
Buffer
from
to
Are there any user-facing changes?
maybe no