Skip getting PAGE_SIZE when defined as macro#81
Open
ptrcnull wants to merge 2 commits intoROCm:masterfrom
Open
Skip getting PAGE_SIZE when defined as macro#81ptrcnull wants to merge 2 commits intoROCm:masterfrom
ptrcnull wants to merge 2 commits intoROCm:masterfrom
Conversation
This env variable sets the max VA alignment order size as "PAGE_SIZE * 2^alignment order" during mapping. By default the order size is set to 9(2MB). Signed-off-by: Alex Sierra <alex.sierra@amd.com> Change-Id: I01ae4e0963f4d21c7c367464e60f865bc58d7fac (cherry picked from commit f6f1350)
In some cases, e.g. [when using musl libc][1], PAGE_SIZE is defined as a macro To avoid compilation errors, only get PAGE_SIZE with sysconf when it's not defined [1]: https://elixir.bootlin.com/musl/v1.2.3/source/include/limits.h#L97
Author
|
(if a "rename this to something else" approach is preferred in this case, let me know) |
56a16c2 to
06a9b94
Compare
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.
In some cases, e.g. when using musl libc, PAGE_SIZE is defined as a macro
To avoid compilation errors, only get PAGE_SIZE with sysconf when it's not defined
See #65