[llvm] Add a way to speed up the speed in which BumpPtrAllocator increases slab sizes
Summary: In D68549 we noticed that our BumpPtrAllocator we use for LLDB's ConstString implementation is growing its slabs at a rate that is too slow for our use case. It causes that we spend a lot of time calling `malloc` for all the tiny slabs that our ConstString BumpPtrAllocators create. We also can't just increase the slab size in the ConstString implementation (which is what D68549 originally did) as this really increased the amount of (mostly unused) allocated memory in any process using ConstString. This patch adds a template argument for the BumpPtrAllocatorImpl that allows specifying a faster rate at which the BumpPtrAllocator increases the slab size. This allows LLDB to specify a faster rate at which the slabs grow which should keep both memory consumption and time spent calling malloc low. Reviewers: george.karpenkov, chandlerc, NoQ Subscribers: NoQ, llvm-commits, llunak Tags: #llvm Differential Revision: https://reviews.llvm.org/D71654
Loading
Please register or sign in to comment