-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use byte padding to avoid fields re-ordering on JDK 15 and above (#3168)
On modern JDK (15+) good old trick using `long` fields as padding is no longer reliable: fields can be reordered and packed into the unused space of superclass fields. To prevent false-sharing this commit switches to `byte` padding, for which you cannot have "unused" space, as the smallest byte takes as much space as the largest. See https://shipilev.net/jvm/objects-inside-out/#_superhierarchy_gaps_in_java_15. Fixes #2057.
- Loading branch information
Showing
4 changed files
with
198 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.