[PATCH] D93452: [clangd] Trim memory periodically

Sam McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 05:17:39 PST 2021


sammccall added a comment.

I tried to sketch a couple of tetris-based mental models for why these hashtables might never fit inside an existing gap, leading us to stack our arena size (tetris field height) higher and higher.
This is predicated on the assumption that the index hashtables are the biggest single contiguous allocations in clangd, which I think is true. (It also explains why std::map fares better - each node is a separate allocation. Unfortunately, this is also why it's performance is terrible...)
Not sure which/either is model true, but I found it entertaining.

F14957068: image.png <https://reviews.llvm.org/F14957068>


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93452



More information about the llvm-commits mailing list