1 | // Test suitability of alignment of statically-allocated Objects.
|
---|
2 | class SyncGlobal
|
---|
3 | {
|
---|
4 | private static final byte[] global_1 = { 1 };
|
---|
5 | private static final byte[] global_2 = { 2, 3 };
|
---|
6 | private static final byte[] global_3 = { 4, 5, 6 };
|
---|
7 | private static final byte[] global_4 = { 7, 8, 9, 10 };
|
---|
8 | private static final byte[] global_5 = { 11, 12, 13, 14, 15 };
|
---|
9 | private static final byte[] global_6 = { 16, 17, 18, 19, 20, 21 };
|
---|
10 | private static final byte[] global_7 = { 22, 23, 24, 25, 26, 27, 28 };
|
---|
11 | private static final byte[] global_8 = { 29, 30, 31, 32, 33, 34, 35, 36 };
|
---|
12 |
|
---|
13 | public static void main (String args[])
|
---|
14 | {
|
---|
15 | synchronized (global_1) { System.out.println ("PASS1"); }
|
---|
16 | synchronized (global_2) { System.out.println ("PASS2"); }
|
---|
17 | synchronized (global_3) { System.out.println ("PASS3"); }
|
---|
18 | synchronized (global_4) { System.out.println ("PASS4"); }
|
---|
19 | synchronized (global_5) { System.out.println ("PASS5"); }
|
---|
20 | synchronized (global_6) { System.out.println ("PASS6"); }
|
---|
21 | synchronized (global_7) { System.out.println ("PASS7"); }
|
---|
22 | synchronized (global_8) { System.out.println ("PASS8"); }
|
---|
23 | }
|
---|
24 | }
|
---|