hotspot/src/share/vm/utilities/globalDefinitions.hpp
changeset 37512 9bd963ed64fc
parent 37480 291ee208fb72
parent 37510 cf066fe4531b
child 38144 0976c0c5c5d3
equal deleted inserted replaced
37487:2ef46fd3ecef 37512:9bd963ed64fc
   197 const size_t K                  = 1024;
   197 const size_t K                  = 1024;
   198 const size_t M                  = K*K;
   198 const size_t M                  = K*K;
   199 const size_t G                  = M*K;
   199 const size_t G                  = M*K;
   200 const size_t HWperKB            = K / sizeof(HeapWord);
   200 const size_t HWperKB            = K / sizeof(HeapWord);
   201 
   201 
   202 const jint min_jint = (jint)1 << (sizeof(jint)*BitsPerByte-1); // 0x80000000 == smallest jint
       
   203 const jint max_jint = (juint)min_jint - 1;                     // 0x7FFFFFFF == largest jint
       
   204 
       
   205 // Constants for converting from a base unit to milli-base units.  For
   202 // Constants for converting from a base unit to milli-base units.  For
   206 // example from seconds to milliseconds and microseconds
   203 // example from seconds to milliseconds and microseconds
   207 
   204 
   208 const int MILLIUNITS    = 1000;         // milli units per base unit
   205 const int MILLIUNITS    = 1000;         // milli units per base unit
   209 const int MICROUNITS    = 1000000;      // micro units per base unit
   206 const int MICROUNITS    = 1000000;      // micro units per base unit
   378 
   375 
   379 typedef jbyte  s1;
   376 typedef jbyte  s1;
   380 typedef jshort s2;
   377 typedef jshort s2;
   381 typedef jint   s4;
   378 typedef jint   s4;
   382 typedef jlong  s8;
   379 typedef jlong  s8;
       
   380 
       
   381 const jbyte min_jbyte = -(1 << 7);       // smallest jbyte
       
   382 const jbyte max_jbyte = (1 << 7) - 1;    // largest jbyte
       
   383 const jshort min_jshort = -(1 << 15);    // smallest jshort
       
   384 const jshort max_jshort = (1 << 15) - 1; // largest jshort
       
   385 
       
   386 const jint min_jint = (jint)1 << (sizeof(jint)*BitsPerByte-1); // 0x80000000 == smallest jint
       
   387 const jint max_jint = (juint)min_jint - 1;                     // 0x7FFFFFFF == largest jint
   383 
   388 
   384 //----------------------------------------------------------------------------------------------------
   389 //----------------------------------------------------------------------------------------------------
   385 // JVM spec restrictions
   390 // JVM spec restrictions
   386 
   391 
   387 const int max_method_code_size = 64*K - 1;  // JVM spec, 2nd ed. section 4.8.1 (p.134)
   392 const int max_method_code_size = 64*K - 1;  // JVM spec, 2nd ed. section 4.8.1 (p.134)