Mercurial > hg > graal-compiler
diff src/share/vm/services/mallocTracker.hpp @ 20642:ec2c6fdd1ce6
8062870: src/share/vm/services/mallocTracker.hpp:64 assert(_count > 0) failed: Negative counter
Summary: Signed bitfield size y can only have (1 << y)-1 values.
Reviewed-by: shade, dholmes, jrose, ctornqvi, gtriantafill
author | coleenp |
---|---|
date | Fri, 14 Nov 2014 17:39:38 -0500 |
parents | 787c9c28311f |
children |
line wrap: on
line diff
--- a/src/share/vm/services/mallocTracker.hpp Fri Nov 14 07:51:50 2014 -0800 +++ b/src/share/vm/services/mallocTracker.hpp Fri Nov 14 17:39:38 2014 -0500 @@ -243,15 +243,15 @@ size_t _flags : 8; size_t _pos_idx : 16; size_t _bucket_idx: 40; -#define MAX_MALLOCSITE_TABLE_SIZE ((size_t)1 << 40) -#define MAX_BUCKET_LENGTH ((size_t)(1 << 16)) +#define MAX_MALLOCSITE_TABLE_SIZE right_n_bits(40) +#define MAX_BUCKET_LENGTH right_n_bits(16) #else size_t _size : 32; size_t _flags : 8; size_t _pos_idx : 8; size_t _bucket_idx: 16; -#define MAX_MALLOCSITE_TABLE_SIZE ((size_t)(1 << 16)) -#define MAX_BUCKET_LENGTH ((size_t)(1 << 8)) +#define MAX_MALLOCSITE_TABLE_SIZE right_n_bits(16) +#define MAX_BUCKET_LENGTH right_n_bits(8) #endif // _LP64 public: