Skip to content

Commit 7ed3c2e

Browse files
committed
[lldb] Increase the maximum number of classes we can read from shared 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
1 parent aaca8e2 commit 7ed3c2e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2308,7 +2308,10 @@ AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap() {
23082308

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

23132316
UtilityFunction *get_class_info_code = GetClassInfoUtilityFunction(exe_ctx);
23142317
if (!get_class_info_code) {

0 commit comments

Comments
 (0)