Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/sparsePRT.cpp @ 6198:24b9c7f4cae6
Merge
author | coleenp |
---|---|
date | Mon, 02 Jul 2012 13:11:28 -0400 |
parents | d2a62e0f25eb |
children | 5c93c1f61226 |
comparison
equal
deleted
inserted
replaced
6195:bcffa4c5eef6 | 6198:24b9c7f4cae6 |
---|---|
146 // ---------------------------------------------------------------------- | 146 // ---------------------------------------------------------------------- |
147 | 147 |
148 RSHashTable::RSHashTable(size_t capacity) : | 148 RSHashTable::RSHashTable(size_t capacity) : |
149 _capacity(capacity), _capacity_mask(capacity-1), | 149 _capacity(capacity), _capacity_mask(capacity-1), |
150 _occupied_entries(0), _occupied_cards(0), | 150 _occupied_entries(0), _occupied_cards(0), |
151 _entries((SparsePRTEntry*)NEW_C_HEAP_ARRAY(char, SparsePRTEntry::size() * capacity)), | 151 _entries((SparsePRTEntry*)NEW_C_HEAP_ARRAY(char, SparsePRTEntry::size() * capacity, mtGC)), |
152 _buckets(NEW_C_HEAP_ARRAY(int, capacity)), | 152 _buckets(NEW_C_HEAP_ARRAY(int, capacity, mtGC)), |
153 _free_list(NullEntry), _free_region(0) | 153 _free_list(NullEntry), _free_region(0) |
154 { | 154 { |
155 clear(); | 155 clear(); |
156 } | 156 } |
157 | 157 |
158 RSHashTable::~RSHashTable() { | 158 RSHashTable::~RSHashTable() { |
159 if (_entries != NULL) { | 159 if (_entries != NULL) { |
160 FREE_C_HEAP_ARRAY(SparsePRTEntry, _entries); | 160 FREE_C_HEAP_ARRAY(SparsePRTEntry, _entries, mtGC); |
161 _entries = NULL; | 161 _entries = NULL; |
162 } | 162 } |
163 if (_buckets != NULL) { | 163 if (_buckets != NULL) { |
164 FREE_C_HEAP_ARRAY(int, _buckets); | 164 FREE_C_HEAP_ARRAY(int, _buckets, mtGC); |
165 _buckets = NULL; | 165 _buckets = NULL; |
166 } | 166 } |
167 } | 167 } |
168 | 168 |
169 void RSHashTable::clear() { | 169 void RSHashTable::clear() { |