Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c88a56e

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 (cherry picked from commit 7ed3c2e)
1 parent ee591a9 commit c88a56e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -2321,7 +2321,10 @@ AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap() {
23212321

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

23262329
UtilityFunction *get_class_info_code = GetClassInfoUtilityFunction(exe_ctx);
23272330
if (!get_class_info_code) {

0 commit comments

Comments
 (0)