[scudo] Optimize scudo test string allocation
authorDominic Chen <daming_chen@apple.com>
Sat, 10 Dec 2022 01:22:38 +0000 (17:22 -0800)
committerDominic Chen <daming_chen@apple.com>
Mon, 12 Dec 2022 23:50:00 +0000 (15:50 -0800)
commit119f977d9e3f8af9f5ac54270e828e354452f903
tree7d005434bd4d2d31e32785dc1ea653f6392ced2c
parent80760e91746ec44b49fcfea4c44bf768b845c64d
[scudo] Optimize scudo test string allocation

When the underlying vector becomes full, it resizes, remaps, and then copies over the old data. To avoid thes excess allocations, allow reservation from the backing vector.

Differential Revision: https://reviews.llvm.org/D135119
compiler-rt/lib/scudo/standalone/string_utils.h
compiler-rt/lib/scudo/standalone/tests/strings_test.cpp