Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[runtime] Explicitly align application shared library to page size #9041

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

grendello
Copy link
Contributor

@grendello grendello commented Jun 19, 2024

This is just for parity with what clang uses, it will align the libxamarin-app.so
library to a more natural boundary of 4k bytes (size of a memory page on Android)

Without the flag, the shared library is aligned to 64k bytes, which is wasteful with
regards to consumed memory (not much, but still) and may also make memory access slightly
slower than necessary.

This is just for parity with what `clang` uses, it will align the
`libxamarin-app.so` library to a more natural boundary of 4k bytes
(size of a memory page on Android)
@grendello grendello changed the title Explicitly align to 4k [runtime] Explicitly align application shared library to page size Jun 19, 2024
@grendello grendello merged commit e174305 into main Jun 19, 2024
58 checks passed
@grendello grendello deleted the dev/grendel/native-linker-flags branch June 19, 2024 13:59
grendello added a commit that referenced this pull request Jun 21, 2024
* main: (26 commits)
  Make APK and shared library alignment configurable (#9046)
  [r8] update proguard rule to keep .NET runtime classes (#9044)
  Explicitly align to 4k (#9041)
  [trimming] preserve custom views and `$(AndroidHttpClientHandlerType)` (#8954)
  Ignore split configs when bundle config moves shared libraries to base.apk (#8987)
  Bump to dotnet/android-tools@1c09dcc (#9026)
  Bump to dotnet/java-interop@ccafbe6 (#9025)
  [Mono.Android-Tests] Fix repo URL in redirect tests (#9035)
  [ci] Update checkout path for nightly build (#9028)
  [ci] Fix android source path for MAUI test job (#9030)
  Link Code of Conduct (#9034)
  [ci] Update sdk-insertions trigger to manual only (#9029)
  Update java-interop and android-tools submodule mentions (#9023)
  LEGO: Merge pull request 9022
  [Xamarin.Android.Build.Tasks] fastdev works with aab files (#8990)
  Use new binutils URL (#9019)
  Localized file check-in by OneLocBuild Task: Build definition ID 17928: Build ID 9686669 (#9011)
  LEGO: Merge pull request 9015
  [api-merge] Update "constant" values to mirror latest API levels (#9004)
  [Mono.Android] Fix wrong value for `ApplicationExitInfoReason.Other` (#9003)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants