Skip to content

Commit fb4098f

Browse files
committed
8317730: Change byte_size to return size_t
Reviewed-by: coleenp, kbarrett
1 parent c2abf12 commit fb4098f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hotspot/share/utilities/globalDefinitions.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,8 +1138,8 @@ static inline julong uabs(jlong n) { return uabs((julong)n); }
11381138
static inline unsigned int uabs(int n) { return uabs((unsigned int)n); }
11391139

11401140
// "to" should be greater than "from."
1141-
inline intx byte_size(void* from, void* to) {
1142-
return (address)to - (address)from;
1141+
inline size_t byte_size(void* from, void* to) {
1142+
return pointer_delta(to, from, sizeof(char));
11431143
}
11441144

11451145
// Pack and extract shorts to/from ints:

0 commit comments

Comments
 (0)