Skip to content

Commit

Permalink
Disable compressed pointers on iOS. (flutter#34001)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rmacnak-google authored Jun 13, 2022
1 parent 7aa8484 commit 8cee666
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/gn
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,10 @@ def to_gn_args(args):
sys.exit(1)
gn_args['enable_vulkan_validation_layers'] = True

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

if args.fuchsia_target_api_level is not None:
Expand Down

0 comments on commit 8cee666

Please sign in to comment.