Mercurial > hg > graal-compiler
diff src/share/vm/utilities/bitMap.cpp @ 6197:d2a62e0f25eb
6995781: Native Memory Tracking (Phase 1)
7151532: DCmd for hotspot native memory tracking
Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd
Reviewed-by: acorn, coleenp, fparain
author | zgu |
---|---|
date | Thu, 28 Jun 2012 17:03:16 -0400 |
parents | 2a0172480595 |
children | 7b835924c31c |
line wrap: on
line diff
--- a/src/share/vm/utilities/bitMap.cpp Wed Jun 27 15:23:36 2012 +0200 +++ b/src/share/vm/utilities/bitMap.cpp Thu Jun 28 17:03:16 2012 -0400 @@ -65,8 +65,8 @@ if (in_resource_area) { _map = NEW_RESOURCE_ARRAY(bm_word_t, new_size_in_words); } else { - if (old_map != NULL) FREE_C_HEAP_ARRAY(bm_word_t, _map); - _map = NEW_C_HEAP_ARRAY(bm_word_t, new_size_in_words); + if (old_map != NULL) FREE_C_HEAP_ARRAY(bm_word_t, _map, mtInternal); + _map = NEW_C_HEAP_ARRAY(bm_word_t, new_size_in_words, mtInternal); } Copy::disjoint_words((HeapWord*)old_map, (HeapWord*) _map, MIN2(old_size_in_words, new_size_in_words)); @@ -469,7 +469,7 @@ void BitMap::init_pop_count_table() { if (_pop_count_table == NULL) { - BitMap::idx_t *table = NEW_C_HEAP_ARRAY(idx_t, 256); + BitMap::idx_t *table = NEW_C_HEAP_ARRAY(idx_t, 256, mtInternal); for (uint i = 0; i < 256; i++) { table[i] = num_set_bits(i); } @@ -479,7 +479,7 @@ (intptr_t) NULL_WORD); if (res != NULL_WORD) { guarantee( _pop_count_table == (void*) res, "invariant" ); - FREE_C_HEAP_ARRAY(bm_word_t, table); + FREE_C_HEAP_ARRAY(bm_word_t, table, mtInternal); } } }