-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-4905: [C++][Plasma] Remove dlmalloc symbols from client library #3927
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
Conversation
xhochy
left a comment
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.
+1, LGTM
|
This needs to be rebased after merging #3928. It would probably be a good idea to check that the static/shared-only builds aren't broken by this |
e24f56f to
7fd7bd0
Compare
|
Rebased and fixed merge conflict |
pitrou
left a comment
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.
Looks worthwhile in principle, just two comments.
cpp/src/plasma/malloc.h
Outdated
| int64_t GetMmapSize(int fd); | ||
|
|
||
| void SetMallocGranularity(int value); | ||
| struct mmap_record { |
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.
Can't you put all this in a namespace?
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.
Yes, I put everything in a namespace now!
cpp/src/plasma/dlmalloc.cc
Outdated
| return -1; | ||
| } | ||
|
|
||
| FILE* file = fdopen(fd, "a+"); |
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.
I realize this is just being moved around, but FTR I fail to understand what the file achieves. It's not used in any case below.
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.
Yeah, I removed it (both fdopen and also the dup further below).
cmake changes add missing file fixes cmake-format revert dlmalloc.c rename clang-format fix shuffle more files update
7fd7bd0 to
ab5f616
Compare
Codecov Report
@@ Coverage Diff @@
## master #3927 +/- ##
==========================================
+ Coverage 87.83% 88.64% +0.81%
==========================================
Files 728 595 -133
Lines 89822 80188 -9634
Branches 1252 0 -1252
==========================================
- Hits 78891 71086 -7805
+ Misses 10814 9102 -1712
+ Partials 117 0 -117
Continue to review full report at Codecov.
|
|
@wesm: The static linking docker compose test if failing with for me. I'm pretty sure it's unrelated to this PR, any idea what is going on? |
|
Not sure, it might be a link order thing. Can you please open a JIRA? |
|
See #3974 for a fix |
pitrou
left a comment
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.
+1, thanks for the changes
This separates the allocator into a part that is only linked into the store (dlmalloc.cc, containing dlmalloc) and a part that is only linked into the client (malloc.cc, not containing dlmalloc). Also a small build system cleanup (not adding the thirdparty/ directory to the include path). Author: Philipp Moritz <pcmoritz@gmail.com> Closes apache#3927 from pcmoritz/split-plasma-server-client and squashes the following commits: 77cd7cd <Philipp Moritz> update d5de8fc <Philipp Moritz> clean up plasma file descriptor handling 1c979d2 <Philipp Moritz> update 57903be <Philipp Moritz> update aa40a2b <Philipp Moritz> put functions into namespace 81e53ac <Philipp Moritz> increase timeout ab5f616 <Philipp Moritz> separate client and store code
This separates the allocator into a part that is only linked into the store (dlmalloc.cc, containing dlmalloc) and a part that is only linked into the client (malloc.cc, not containing dlmalloc). Also a small build system cleanup (not adding the thirdparty/ directory to the include path).