[libcxx-commits] [PATCH] D119628: [libc++] Don't return alloc_size - 1 in __recommend to add 1 when allocating

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 12 04:46:28 PST 2022


philnik created this revision.
philnik added reviewers: Quuxplusone, ldionne.
philnik requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

For some reason `__recommend` returns the recommended allocation size minus one, and at almost every call site one is added to the returned value.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119628

Files:
  libcxx/include/string

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119628.408176.patch
Type: text/x-patch
Size: 5983 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220212/8e8bc57b/attachment.bin>


More information about the libcxx-commits mailing list