Comment on Core scheduling lands in Linux 5.14parentComments−oynqr4yThe minimum size for unsigned long is 4 bytes−dataflow4yOh I didn't realize its size varies on x86 and x64... I thought it's always 64-bit under compilers that target Linux! Today I learned...−tomsmeding4yThere is a difference between 'long' and 'long long'. I believe the latter is always 64 bits on Linux.−dataflow4yI'm indeed aware of that one :-)−jamesfinlayson4yI think the size can vary by compiler rather than just by architecture.−dataflow4yYeah it can but in practice systems have a canonical model in their official headers.−gpderetta4yAnd yet msvc and gcc disagree on sizeof(long) on AMD64.Edit: but of course you meant OS with system, not hardware architecture :)−dataflow4yMSVC on... Linux AMD64?−gpderetta4y:) to be fair I did note my misunderstanding in my edit.
Comments
The minimum size for unsigned long is 4 bytes
Oh I didn't realize its size varies on x86 and x64... I thought it's always 64-bit under compilers that target Linux! Today I learned...
There is a difference between 'long' and 'long long'. I believe the latter is always 64 bits on Linux.
I'm indeed aware of that one :-)
I think the size can vary by compiler rather than just by architecture.
Yeah it can but in practice systems have a canonical model in their official headers.
And yet msvc and gcc disagree on sizeof(long) on AMD64.
Edit: but of course you meant OS with system, not hardware architecture :)
MSVC on... Linux AMD64?
:) to be fair I did note my misunderstanding in my edit.