50 _buf = NULL; |
50 _buf = NULL; |
51 _index = 0; |
51 _index = 0; |
52 } |
52 } |
53 } |
53 } |
54 |
54 |
55 |
|
56 static int byte_index_to_index(int ind) { |
|
57 assert((ind % oopSize) == 0, "Invariant."); |
|
58 return ind / oopSize; |
|
59 } |
|
60 |
|
61 static int index_to_byte_index(int byte_ind) { |
|
62 return byte_ind * oopSize; |
|
63 } |
|
64 |
55 |
65 void PtrQueue::enqueue_known_active(void* ptr) { |
56 void PtrQueue::enqueue_known_active(void* ptr) { |
66 assert(0 <= _index && _index <= _sz, "Invariant."); |
57 assert(0 <= _index && _index <= _sz, "Invariant."); |
67 assert(_index == 0 || _buf != NULL, "invariant"); |
58 assert(_index == 0 || _buf != NULL, "invariant"); |
68 |
59 |