Skip to content

Commit

Permalink
[lldb] Increase the maximum number of classes we can read from shared…
Browse files Browse the repository at this point in the history
… cache

The shared cache has grown past the previously hardcoded limit. As a
temporary measure, I am increasing the hardcoded number of classes we
can expect to read from the shared cache. This is not a good long-term
solution.

Differential Revision: https://reviews.llvm.org/D153817
  • Loading branch information
bulbazord committed Jun 26, 2023
1 parent aaca8e2 commit 7ed3c2e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2308,7 +2308,10 @@ AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap() {

// The number of entries to pre-allocate room for.
// Each entry is (addrsize + 4) bytes
const uint32_t max_num_classes = 163840;
// FIXME: It is not sustainable to continue incrementing this value every time
// the shared cache grows. This is because it requires allocating memory in
// the inferior process and some inferior processes have small memory limits.
const uint32_t max_num_classes = 212992;

UtilityFunction *get_class_info_code = GetClassInfoUtilityFunction(exe_ctx);
if (!get_class_info_code) {
Expand Down

0 comments on commit 7ed3c2e

Please sign in to comment.