equal
deleted
inserted
replaced
23 */ |
23 */ |
24 |
24 |
25 #ifndef SHARE_GC_G1_G1FREEIDSET_HPP |
25 #ifndef SHARE_GC_G1_G1FREEIDSET_HPP |
26 #define SHARE_GC_G1_G1FREEIDSET_HPP |
26 #define SHARE_GC_G1_G1FREEIDSET_HPP |
27 |
27 |
28 #include "memory/allocation.hpp" |
|
29 #include "runtime/semaphore.hpp" |
28 #include "runtime/semaphore.hpp" |
30 #include "utilities/globalDefinitions.hpp" |
29 #include "utilities/globalDefinitions.hpp" |
31 |
30 |
32 // Represents a set of small integer ids, from which elements can be |
31 // Represents a set of small integer ids, from which elements can be |
33 // temporarily allocated for exclusive use. The ids are in a |
32 // temporarily allocated for exclusive use. The ids are in a |
34 // contiguous range from 'start' to 'start + size'. Used to obtain a |
33 // contiguous range from 'start' to 'start + size'. Used to obtain a |
35 // distinct worker_id value for a mutator thread that doesn't normally |
34 // distinct worker_id value for a mutator thread that doesn't normally |
36 // have such an id. |
35 // have such an id. |
37 class G1FreeIdSet : public CHeapObj<mtGC> { |
36 class G1FreeIdSet { |
38 Semaphore _sem; |
37 Semaphore _sem; |
39 uint* _next; |
38 uint* _next; |
40 uint _start; |
39 uint _start; |
41 uint _size; |
40 uint _size; |
42 uintx _head_index_mask; |
41 uintx _head_index_mask; |