[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
Tue Apr 30 11:07:21 PDT 2024


vitalybuka wrote:

> I'm asking where we get the mismatch. My current mental model is that we always allocate an even number of elements (due to `__recommend()` returning an odd number plus one resulting in an even number), which apparently isn't the case. In which part of the code is my mental model failing? 

Got it, will reproduce with details soon.

> Your current solution looks like a band-aid to me and not like it's fixing the underlying issue.

Sorry, it's just how I understood the code, will be happy to improve.



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


More information about the libcxx-commits mailing list