-
Notifications
You must be signed in to change notification settings - Fork 431
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
TEST/UCP: Meet aligned_alloc requirements for requested size #9534
TEST/UCP: Meet aligned_alloc requirements for requested size #9534
Conversation
test/gtest/ucp/test_ucp_tag_xfer.cc
Outdated
|
||
EXPECT_TRUE(ucs_is_pow2(chunk_size) && ucs_is_pow2(page_size)) << | ||
"message size should be aligned to both page and chunk sizes"; | ||
size_t alignment = ucs_max(chunk_size, page_size); |
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 think chunk_size may be not a power of 2 - if num_lanes is not a power of 2
maybe alignment = ucs_max(page_size, UCS_SYS_PCI_MAX_PAYLOAD) * num_lanes()
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.
Done.
02d3219
to
c110286
Compare
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.
pls squash
What
Make message size divisible to page size.
Why ?
aligned_alloc
requires that allocated size should be divisible to alignmentcppreference:
Found by ASAN.