comparison src/share/vm/gc_implementation/parNew/parCardTableModRefBS.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 441e946dc1af
children 957c266d8bc5 b9a9ed0f8eeb
comparison
equal deleted inserted replaced
6174:74533f63b116 6197:d2a62e0f25eb
455 455
456 // Should we delete the old? 456 // Should we delete the old?
457 if (_lowest_non_clean[i] != NULL) { 457 if (_lowest_non_clean[i] != NULL) {
458 assert(n_chunks != _lowest_non_clean_chunk_size[i], 458 assert(n_chunks != _lowest_non_clean_chunk_size[i],
459 "logical consequence"); 459 "logical consequence");
460 FREE_C_HEAP_ARRAY(CardPtr, _lowest_non_clean[i]); 460 FREE_C_HEAP_ARRAY(CardPtr, _lowest_non_clean[i], mtGC);
461 _lowest_non_clean[i] = NULL; 461 _lowest_non_clean[i] = NULL;
462 } 462 }
463 // Now allocate a new one if necessary. 463 // Now allocate a new one if necessary.
464 if (_lowest_non_clean[i] == NULL) { 464 if (_lowest_non_clean[i] == NULL) {
465 _lowest_non_clean[i] = NEW_C_HEAP_ARRAY(CardPtr, n_chunks); 465 _lowest_non_clean[i] = NEW_C_HEAP_ARRAY(CardPtr, n_chunks, mtGC);
466 _lowest_non_clean_chunk_size[i] = n_chunks; 466 _lowest_non_clean_chunk_size[i] = n_chunks;
467 _lowest_non_clean_base_chunk_index[i] = addr_to_chunk_index(covered.start()); 467 _lowest_non_clean_base_chunk_index[i] = addr_to_chunk_index(covered.start());
468 for (int j = 0; j < (int)n_chunks; j++) 468 for (int j = 0; j < (int)n_chunks; j++)
469 _lowest_non_clean[i][j] = NULL; 469 _lowest_non_clean[i][j] = NULL;
470 } 470 }