[libcxx-commits] [libcxx] Lower std::string's alignment requirement from 16 to 8. (PR #68807)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 12 23:04:53 PDT 2023
================
@@ -133,6 +133,13 @@ ABI Affecting Changes
results in an ABI break, however in practice we expect uses of ``std::projected`` in ABI-sensitive places to be
extremely rare. Any error resulting from this change should result in a link-time error.
+- Under the unstable ABI, the internal alignment requirements for heap allocations
+ inside std::string has decreased from 16 to 8 This save memory since string requests fewer additional
+ bytes than it did previously. However, this also changes the return value of std::string::max_length
----------------
mordante wrote:
s/std::string::max_length/``std::string::max_size``
https://github.com/llvm/llvm-project/pull/68807
More information about the libcxx-commits
mailing list