aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/gc_implementation/g1/heapRegionManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/vm/gc_implementation/g1/heapRegionManager.cpp')
-rw-r--r--src/share/vm/gc_implementation/g1/heapRegionManager.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/share/vm/gc_implementation/g1/heapRegionManager.cpp b/src/share/vm/gc_implementation/g1/heapRegionManager.cpp
index f1ffc245d..020eb08df 100644
--- a/src/share/vm/gc_implementation/g1/heapRegionManager.cpp
+++ b/src/share/vm/gc_implementation/g1/heapRegionManager.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -145,6 +145,24 @@ void HeapRegionManager::make_regions_available(uint start, uint num_regions) {
}
}
+MemoryUsage HeapRegionManager::get_auxiliary_data_memory_usage() const {
+ size_t used_sz =
+ _prev_bitmap_mapper->committed_size() +
+ _next_bitmap_mapper->committed_size() +
+ _bot_mapper->committed_size() +
+ _cardtable_mapper->committed_size() +
+ _card_counts_mapper->committed_size();
+
+ size_t committed_sz =
+ _prev_bitmap_mapper->reserved_size() +
+ _next_bitmap_mapper->reserved_size() +
+ _bot_mapper->reserved_size() +
+ _cardtable_mapper->reserved_size() +
+ _card_counts_mapper->reserved_size();
+
+ return MemoryUsage(0, used_sz, committed_sz, committed_sz);
+}
+
uint HeapRegionManager::expand_by(uint num_regions) {
return expand_at(0, num_regions);
}