8317730: Change byte_size to return size_t

Reviewed-by: coleenp, kbarrett
This commit is contained in:
Albert Mingkun Yang 2023-10-10 11:55:07 +00:00
parent c2abf120bc
commit fb4098ff1a

View File

@ -1138,8 +1138,8 @@ static inline julong uabs(jlong n) { return uabs((julong)n); }
static inline unsigned int uabs(int n) { return uabs((unsigned int)n); } static inline unsigned int uabs(int n) { return uabs((unsigned int)n); }
// "to" should be greater than "from." // "to" should be greater than "from."
inline intx byte_size(void* from, void* to) { inline size_t byte_size(void* from, void* to) {
return (address)to - (address)from; return pointer_delta(to, from, sizeof(char));
} }
// Pack and extract shorts to/from ints: // Pack and extract shorts to/from ints: