-
Notifications
You must be signed in to change notification settings - Fork 25
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
[c++] Address final valgrind
issue
#2403
Conversation
Also removes one function no longer needed
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.
LGTM. Nice catch.
Thanks! It's all valgrind. And I still fail at my 'pro license' as I once again forgot the value-add provided by |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2403 +/- ##
===========================================
+ Coverage 66.07% 90.61% +24.53%
===========================================
Files 144 37 -107
Lines 13006 3900 -9106
Branches 511 0 -511
===========================================
- Hits 8594 3534 -5060
+ Misses 4312 366 -3946
+ Partials 100 0 -100
Flags with carried forward coverage won't be shown. Click here to find out more.
|
* Release (default) allocation of private_data before point to ours * Remove unnecessary buffer set up done by nanoarrow Also removes one function no longer needed * White-space only commit because of clang-format Co-authored-by: Dirk Eddelbuettel <[email protected]>
Issue and/or context:
When running under
valgrind
(by for example calling an R script or expression and starting asR -q -d valgrind
) and with the propermemcheck
instrumentation for chasing leaks, we were reminded that we lost a small fixed amoumt of 248 bytes per column retrieved. This was due to allocating the (opaque)private_data
by default and then (as we do here for buffer management) store the ArrowBuffer / ColumnBuffer container handle.Changes:
By freeing the default allocation before assigning, we no longer leak. We also removed another small assignment (and helper function used) taken care of now by
nanoarrow
following #2188.Notes for Reviewer:
SC 44774