Refine memory buffer for importing shared cache objc class list
In https://reviews.llvm.org/D118972 I increased this buffer to be big enough to import 261,144 classes but this is a lot more than we currently have, an allocating a too-large buffer can add memory pressure even if it's only for a short time. Reduce the size of this memory buffer to big enough to import 163,840 classes. I'll probably move to a scheme where we read the objc classes in chunks, with a smaller buffer and multiple inferior function calls. rdar://91275493
This commit is contained in:
parent
7c53fc4fe1
commit
ee394177e6
|
@ -2010,7 +2010,8 @@ AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap() {
|
|||
return DescriptorMapUpdateResult::Fail();
|
||||
|
||||
// The number of entries to pre-allocate room for.
|
||||
const uint32_t max_num_classes = 256 * 1024;
|
||||
// Each entry is (addrsize + 4) bytes
|
||||
const uint32_t max_num_classes = 163840;
|
||||
|
||||
UtilityFunction *get_class_info_code = GetClassInfoUtilityFunction(exe_ctx);
|
||||
if (!get_class_info_code) {
|
||||
|
|
Loading…
Reference in a new issue