Lines Matching defs:ByteSize

32 // they serve as 'unit' types. ByteSize is used for sizes measured in bytes, while
45 // in optimized mode as both, ByteSize and WordSize are mapped to the same type
58 // b) change all WordSize's to ByteSize's where desired and fix the compilation errors
63 class ByteSize VALUE_OBJ_CLASS_SPEC {
68 ByteSize(int size) { _size = size; }
72 inline friend ByteSize in_ByteSize(int size);
75 inline friend int in_bytes(ByteSize x);
78 friend ByteSize operator + (ByteSize x, ByteSize y) { return ByteSize(in_bytes(x) + in_bytes(y)); }
79 friend ByteSize operator - (ByteSize x, ByteSize y) { return ByteSize(in_bytes(x) - in_bytes(y)); }
80 friend ByteSize operator * (ByteSize x, int y) { return ByteSize(in_bytes(x) * y ); }
83 friend bool operator == (ByteSize x, ByteSize y) { return in_bytes(x) == in_bytes(y); }
84 friend bool operator != (ByteSize x, ByteSize y) { return in_bytes(x) != in_bytes(y); }
85 friend bool operator < (ByteSize x, ByteSize y) { return in_bytes(x) < in_bytes(y); }
86 friend bool operator <= (ByteSize x, ByteSize y) { return in_bytes(x) <= in_bytes(y); }
87 friend bool operator > (ByteSize x, ByteSize y) { return in_bytes(x) > in_bytes(y); }
88 friend bool operator >= (ByteSize x, ByteSize y) { return in_bytes(x) >= in_bytes(y); }
91 inline ByteSize in_ByteSize(int size) { return ByteSize(size); }
92 inline int in_bytes(ByteSize x) { return x._size; }
137 typedef int ByteSize;
138 inline ByteSize in_ByteSize(int size) { return size; }
139 inline int in_bytes (ByteSize x) { return x; }