Skip to content

Commit 93c7c89

Browse files
GC: Correctly align exclusive_sync.alloc_objects (#67799)
Previously, the calculation of the `cache_separator` size of the array failed to take the first member `rwp_object` into account. Therefore, `alloc_objects` was not properly aligned to `HS_CACHE_LINE_SIZE`.
1 parent 1276f01 commit 93c7c89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coreclr/gc/gc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ class exclusive_sync
11071107

11081108
int spin_count;
11091109

1110-
uint8_t cache_separator[HS_CACHE_LINE_SIZE - sizeof (int) - sizeof (int32_t)];
1110+
uint8_t cache_separator[HS_CACHE_LINE_SIZE - (sizeof (spin_count) + sizeof (needs_checking) + sizeof (rwp_object))];
11111111

11121112
// TODO - perhaps each object should be on its own cache line...
11131113
VOLATILE(uint8_t*) alloc_objects[max_pending_allocs];

0 commit comments

Comments
 (0)