AnDiXL commented on code in PR #3698:
URL: https://github.com/apache/brpc/pull/3698#discussion_r4438861020
##########
config_brpc.sh:
##########
@@ -396,6 +396,14 @@ else
print_success "Found protobuf version $PROTOBUF_VERSION"
fi
+# Cacheline-aligned types such as ResourcePool<Socket> are created with plain
+# `new'. C++17 honors their alignment by default, C++14 only with
+# -faligned-new; without it glibc returns 16-byte aligned storage.
+if echo 'int main() { return 0; }' | \
+ $CXX $CXXFLAGS -faligned-new -x c++ - -o /dev/null >/dev/null 2>&1;
then
Review Comment:
Fixed. `config_brpc.sh` links the same over-aligned allocation, so the
runtime is checked as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]