Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8cee666

Browse files
Disable compressed pointers on iOS. (#34001)
Because we are unable to allocate address space without also allocating memory, even unused portions of the compressed heap make less memory available to all other allocators in the process. The memory savings in the compressed heap will only out-weight the lost memory for other allocations if nearly all of the application's memory usage is in Dart, rather than, say, graphics or plugins. Bug: flutter/flutter#105183 Bug: b/235279083
1 parent 7aa8484 commit 8cee666

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/gn

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,10 @@ def to_gn_args(args):
508508
sys.exit(1)
509509
gn_args['enable_vulkan_validation_layers'] = True
510510

511-
# Enable pointer compression on 64-bit mobile targets.
512-
if args.target_os in ['android', 'ios'
513-
] and gn_args['target_cpu'] in ['x64', 'arm64']:
511+
# Enable pointer compression on 64-bit mobile targets. iOS is excluded due to
512+
# its inability to allocate address space without allocating memory.
513+
if args.target_os in ['android'] and gn_args['target_cpu'] in ['x64', 'arm64'
514+
]:
514515
gn_args['dart_use_compressed_pointers'] = True
515516

516517
if args.fuchsia_target_api_level is not None:

0 commit comments

Comments
 (0)