I'm writing a memory manager in C and am trying to make sure it's properly aligned (make sure the user space starts on an address divisible by 8, and make sure the whole block is divisible by 8 as well).
I was wondering if anyone could tell me what this does:
x = ((x - 1) | 7) + 1;
It's a code fragment that was suggested to me by a friend, but I'm unsure of what it's doing / what the vertical bar's function is in this scenario
Edit: I realize I could've explained this a bit clearer; x is an int, and I did look up that it was a bitwise OR operator, but I didn't understand what that meant in this context. Thanks for the help!