comparison src/share/vm/memory/referencePolicy.cpp @ 457:27a80744a83b

6778647: snap(), snap_policy() should be renamed setup(), setup_policy() Summary: Renamed Reference{Policy,Pocessor} methods from snap{,_policy}() to setup{,_policy}() Reviewed-by: apetrusenko
author ysr
date Mon, 01 Dec 2008 23:25:24 -0800
parents c96030fff130
children ad8c8ca4ab0f
comparison
equal deleted inserted replaced
455:434912c745cf 457:27a80744a83b
24 24
25 # include "incls/_precompiled.incl" 25 # include "incls/_precompiled.incl"
26 # include "incls/_referencePolicy.cpp.incl" 26 # include "incls/_referencePolicy.cpp.incl"
27 27
28 LRUCurrentHeapPolicy::LRUCurrentHeapPolicy() { 28 LRUCurrentHeapPolicy::LRUCurrentHeapPolicy() {
29 snap(); 29 setup();
30 } 30 }
31 31
32 // Capture state (of-the-VM) information needed to evaluate the policy 32 // Capture state (of-the-VM) information needed to evaluate the policy
33 void LRUCurrentHeapPolicy::snap() { 33 void LRUCurrentHeapPolicy::setup() {
34 _max_interval = (Universe::get_heap_free_at_last_gc() / M) * SoftRefLRUPolicyMSPerMB; 34 _max_interval = (Universe::get_heap_free_at_last_gc() / M) * SoftRefLRUPolicyMSPerMB;
35 assert(_max_interval >= 0,"Sanity check"); 35 assert(_max_interval >= 0,"Sanity check");
36 } 36 }
37 37
38 // The oop passed in is the SoftReference object, and not 38 // The oop passed in is the SoftReference object, and not
50 } 50 }
51 51
52 /////////////////////// MaxHeap ////////////////////// 52 /////////////////////// MaxHeap //////////////////////
53 53
54 LRUMaxHeapPolicy::LRUMaxHeapPolicy() { 54 LRUMaxHeapPolicy::LRUMaxHeapPolicy() {
55 snap(); 55 setup();
56 } 56 }
57 57
58 // Capture state (of-the-VM) information needed to evaluate the policy 58 // Capture state (of-the-VM) information needed to evaluate the policy
59 void LRUMaxHeapPolicy::snap() { 59 void LRUMaxHeapPolicy::setup() {
60 size_t max_heap = MaxHeapSize; 60 size_t max_heap = MaxHeapSize;
61 max_heap -= Universe::get_heap_used_at_last_gc(); 61 max_heap -= Universe::get_heap_used_at_last_gc();
62 max_heap /= M; 62 max_heap /= M;
63 63
64 _max_interval = max_heap * SoftRefLRUPolicyMSPerMB; 64 _max_interval = max_heap * SoftRefLRUPolicyMSPerMB;