[libcxx-commits] [libcxx] [libcxx] Align allocation to match `__set_long_cap` and `__get_long_cap` (PR #90292)
Vitaly Buka via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 1 15:30:57 PDT 2024
================
@@ -1959,10 +1960,10 @@ private:
if (__s < __min_cap) {
return static_cast<size_type>(__min_cap) - 1;
}
- const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : 1;
+ const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : __endian_factor;
size_type __guess = __align_it<__boundary>(__s + 1) - 1;
if (__guess == __min_cap)
- ++__guess;
+ __guess += 2;
----------------
vitalybuka wrote:
Done
https://github.com/llvm/llvm-project/pull/90292
More information about the libcxx-commits
mailing list