teemperor added subscribers: xiaobai, teemperor.
teemperor added a comment.

This patch actually made the RSS memory in our benchmarks go up by quite a bit 
(see lldb-bench <https://teemperor.de/lldb-bench/static.html> ). The reason is 
that while we only create 1MiB chunks in the new allocator, we do have 256 
different string pools we use as the backend for ConstString. So this means 
that we actually do allocation steps of 1MiB * 256 = 256MiB which is quite a 
lot. On a side note, we do use ConstString in the lldb-debugserver, and 
allocating additional 256MiB on some device running lldb-debugserver could end 
up being a serious problem if my understanding is correct? (+Alex because IIRC 
he cares about the debug server memory footprint).

Anyway, I think we either make the slab allocation logic smarter than just 
creating 1MiB slabs and trust the kernel/libc to not actually allocate that 
much real memory (maybe something like the std::vector growth model) or we fix 
the fact that we always have 256 string pools.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68549/new/

https://reviews.llvm.org/D68549



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to