-
Notifications
You must be signed in to change notification settings - Fork 409
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
padding function #10
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when i use the padding function from this code,i found that the summary of address and padding mod align bytes can
t be zero sometimes.Should it be a problem? I google the padding problem,someone say the padding function should be like this:
inline size_t padding(int* p, size_t align) noexcept{
uintptr_t result = reinterpret_cast<uintptr_t>(p);
return ((align - (result%align)) % align);
}`
I make a few tests,it works
The text was updated successfully, but these errors were encountered: