Add groupCount/groupMasks to CACHE_RELATIONSHIP#1720
Open
dbwiddis wants to merge 1 commit intojava-native-access:masterfrom
Open
Add groupCount/groupMasks to CACHE_RELATIONSHIP#1720dbwiddis wants to merge 1 commit intojava-native-access:masterfrom
dbwiddis wants to merge 1 commit intojava-native-access:masterfrom
Conversation
Closes java-native-access#1674 The Windows CACHE_RELATIONSHIP struct was updated to use 2 of its reserved bytes for a GroupCount field and replace the single GroupMask with a variable-length GroupMasks array, matching the same change previously made to NUMA_NODE_RELATIONSHIP. Shrink reserved from 20 to 18 bytes, add groupCount (short) and groupMasks array with a read() override to handle both old and new struct layouts.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add groupCount/groupMasks to CACHE_RELATIONSHIP
The Windows
CACHE_RELATIONSHIPstruct was updated (Windows Server 2022 / 21H2) to repurpose 2 of its 20 reserved bytes as aGroupCountfield and replace the singleGroupMaskwith a variable-lengthGroupMasksarray. This is the same change documented in #1324 forNUMA_NODE_RELATIONSHIP.Changes
reservedfrom 20 to 18 bytesgroupCount(short) fieldgroupMasks(GROUP_AFFINITY[]) arraygroupMaskas a public compatibility field (populated fromgroupMasks[0])read()to dynamically size the array based ongroupCountgetFieldList()to exclude the compatibilitygroupMaskfield from structure validationSources
GroupCountandGroupMasksfieldsNUMA_NODE_RELATIONSHIPimplementation in this repo (same pattern applied in #1563)Backward compatibility
On older Windows versions where
GroupCountis 0 (the bytes were previously reserved/zeroed), theread()override forces a minimum array size of 1 and copies the value togroupMask, preserving existing behavior.Closes #1674