33 // things will break badly if incorrectly initialized.
34 int heapOopSize = 0;
35 int LogBytesPerHeapOop = 0;
36 int LogBitsPerHeapOop = 0;
37 int BytesPerHeapOop = 0;
38 int BitsPerHeapOop = 0;
39
40 // Object alignment, in units of HeapWords.
41 // Defaults are -1 so things will break badly if incorrectly initialized.
42 int MinObjAlignment = -1;
43 int MinObjAlignmentInBytes = -1;
44 int MinObjAlignmentInBytesMask = 0;
45
46 int LogMinObjAlignment = -1;
47 int LogMinObjAlignmentInBytes = -1;
48
49 // Oop encoding heap max
50 uint64_t OopEncodingHeapMax = 0;
51
52 void basic_fatal(const char* msg) {
53 fatal(msg);
54 }
55
56 // Something to help porters sleep at night
57
58 void basic_types_init() {
59 #ifdef ASSERT
60 #ifdef _LP64
61 assert(min_intx == (intx)CONST64(0x8000000000000000), "correct constant");
62 assert(max_intx == CONST64(0x7FFFFFFFFFFFFFFF), "correct constant");
63 assert(max_uintx == CONST64(0xFFFFFFFFFFFFFFFF), "correct constant");
64 assert( 8 == sizeof( intx), "wrong size for basic type");
65 assert( 8 == sizeof( jobject), "wrong size for basic type");
66 #else
67 assert(min_intx == (intx)0x80000000, "correct constant");
68 assert(max_intx == 0x7FFFFFFF, "correct constant");
69 assert(max_uintx == 0xFFFFFFFF, "correct constant");
70 assert( 4 == sizeof( intx), "wrong size for basic type");
71 assert( 4 == sizeof( jobject), "wrong size for basic type");
72 #endif
73 assert( (~max_juint) == 0, "max_juint has all its bits");
|
33 // things will break badly if incorrectly initialized.
34 int heapOopSize = 0;
35 int LogBytesPerHeapOop = 0;
36 int LogBitsPerHeapOop = 0;
37 int BytesPerHeapOop = 0;
38 int BitsPerHeapOop = 0;
39
40 // Object alignment, in units of HeapWords.
41 // Defaults are -1 so things will break badly if incorrectly initialized.
42 int MinObjAlignment = -1;
43 int MinObjAlignmentInBytes = -1;
44 int MinObjAlignmentInBytesMask = 0;
45
46 int LogMinObjAlignment = -1;
47 int LogMinObjAlignmentInBytes = -1;
48
49 // Oop encoding heap max
50 uint64_t OopEncodingHeapMax = 0;
51
52 void basic_fatal(const char* msg) {
53 fatal("%s", msg);
54 }
55
56 // Something to help porters sleep at night
57
58 void basic_types_init() {
59 #ifdef ASSERT
60 #ifdef _LP64
61 assert(min_intx == (intx)CONST64(0x8000000000000000), "correct constant");
62 assert(max_intx == CONST64(0x7FFFFFFFFFFFFFFF), "correct constant");
63 assert(max_uintx == CONST64(0xFFFFFFFFFFFFFFFF), "correct constant");
64 assert( 8 == sizeof( intx), "wrong size for basic type");
65 assert( 8 == sizeof( jobject), "wrong size for basic type");
66 #else
67 assert(min_intx == (intx)0x80000000, "correct constant");
68 assert(max_intx == 0x7FFFFFFF, "correct constant");
69 assert(max_uintx == 0xFFFFFFFF, "correct constant");
70 assert( 4 == sizeof( intx), "wrong size for basic type");
71 assert( 4 == sizeof( jobject), "wrong size for basic type");
72 #endif
73 assert( (~max_juint) == 0, "max_juint has all its bits");
|