[libcxx-commits] [libcxx] [libcxx] Align `__recommend() + 1` by __endian_factor (PR #90292)

Valery Mironov via libcxx-commits libcxx-commits at lists.llvm.org
Sat May 18 06:30:28 PDT 2024


MBkkt wrote:

@vitalybuka 

Hello, definitely this patch fix the issue, but I have few questions
1. Why do we need to allocate 25/26 bytes for std::string (abi version 1, big endian/little endian) of size 23? Instead of 24
2. Why do we need assign  (allocation_size / 2 * 2) to capacity instead of just assign capacity? I know it's kind of fixed for new abi and little endian, but big endian code still not good


https://github.com/llvm/llvm-project/pull/90292


More information about the libcxx-commits mailing list