-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Extend usage of GC_ALLOC_ALIGN8 #104781
Extend usage of GC_ALLOC_ALIGN8 #104781
Conversation
fyi @chrisnas |
Tagging subscribers to this area: @dotnet/gc |
There is a CI failure in GC which looks like it may be caused by this change - I am investigating. |
62b8f87
to
796168f
Compare
Just to capture it for the future, this is the GC assert seen prior to when I added RESPECT_LARGE_ALIGNMENT. No claim that it is causal, just that the assert was present prior to defining RESPECT_LARGE_ALIGNMENT and did not reoccur once RESPECT_LARGE_ALIGMENT was defined.
|
It appears that the bookkeeping assert is a previously known issue: #102706 |
In the past we added FEATURE_64BIT_ALIGNMENT to support 8 byte alignment requirements on ARM, but for performance we also like to 8 byte align double arrays on other architectures. The GC has a GC_ALLOC_ALIGN8 flag that does that but it was only being used in the ARM case and we had a more complicated workaround being used elsewhere. This change expands GC_ALLOC_ALIGN8 so it is supported on all architectures and converges all our aligned double arrays to use that approach. GC_ALLOC_ALIGN8 only implies that the initial allocation is 8 byte aligned, not that it will stay aligned after relocation. On ARM it will stay aligned because RESPECT_LARGE_ALIGNMENT is defined but on other 32 bit architectures it is not guaranteed to stay aligned.
796168f
to
3a7c4ea
Compare
In the past we added FEATURE_64BIT_ALIGNMENT to support 8 byte alignment requirements on ARM, but for performance we also like to 8 byte align double arrays on other architectures. The GC has a GC_ALLOC_ALIGN8 flag that does that but it was only being used in the ARM case and we had a more complicated workaround being used elsewhere. This change expands GC_ALLOC_ALIGN8 so it is supported on all architectures and converges all our aligned double arrays to use that approach.
This change is also present in #100356 but extracting it out in a separate PR to make it easy to get it reviewed and merged.
@Maoni0 @jkotas @AaronRobinsonMSFT @davidwrighton