comparison src/share/vm/gc_implementation/shared/mutableSpace.hpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 1e1c8d358b52
children 52b4284cb496
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
29 #include "memory/memRegion.hpp" 29 #include "memory/memRegion.hpp"
30 #include "utilities/copy.hpp" 30 #include "utilities/copy.hpp"
31 31
32 // A MutableSpace is a subtype of ImmutableSpace that supports the 32 // A MutableSpace is a subtype of ImmutableSpace that supports the
33 // concept of allocation. This includes the concepts that a space may 33 // concept of allocation. This includes the concepts that a space may
34 // be only partially full, and the query methods that go with such 34 // be only partially full, and the querry methods that go with such
35 // an assumption. MutableSpace is also responsible for minimizing the 35 // an assumption. MutableSpace is also responsible for minimizing the
36 // page allocation time by having the memory pretouched (with 36 // page allocation time by having the memory pretouched (with
37 // AlwaysPretouch) and for optimizing page placement on NUMA systems 37 // AlwaysPretouch) and for optimizing page placement on NUMA systems
38 // by make the underlying region interleaved (with UseNUMA). 38 // by make the underlying region interleaved (with UseNUMA).
39 // 39 //
109 109
110 virtual void ensure_parsability() { } 110 virtual void ensure_parsability() { }
111 111
112 virtual void mangle_region(MemRegion mr) PRODUCT_RETURN; 112 virtual void mangle_region(MemRegion mr) PRODUCT_RETURN;
113 113
114 // Boolean queries. 114 // Boolean querries.
115 bool is_empty() const { return used_in_words() == 0; } 115 bool is_empty() const { return used_in_words() == 0; }
116 bool not_empty() const { return used_in_words() > 0; } 116 bool not_empty() const { return used_in_words() > 0; }
117 bool contains(const void* p) const { return _bottom <= p && p < _end; } 117 bool contains(const void* p) const { return _bottom <= p && p < _end; }
118 118
119 // Size computations. Sizes are in bytes. 119 // Size computations. Sizes are in bytes.
122 122
123 // Size computations. Sizes are in heapwords. 123 // Size computations. Sizes are in heapwords.
124 virtual size_t used_in_words() const { return pointer_delta(top(), bottom()); } 124 virtual size_t used_in_words() const { return pointer_delta(top(), bottom()); }
125 virtual size_t free_in_words() const { return pointer_delta(end(), top()); } 125 virtual size_t free_in_words() const { return pointer_delta(end(), top()); }
126 virtual size_t tlab_capacity(Thread* thr) const { return capacity_in_bytes(); } 126 virtual size_t tlab_capacity(Thread* thr) const { return capacity_in_bytes(); }
127 virtual size_t tlab_used(Thread* thr) const { return used_in_bytes(); }
128 virtual size_t unsafe_max_tlab_alloc(Thread* thr) const { return free_in_bytes(); } 127 virtual size_t unsafe_max_tlab_alloc(Thread* thr) const { return free_in_bytes(); }
129 128
130 // Allocation (return NULL if full) 129 // Allocation (return NULL if full)
131 virtual HeapWord* allocate(size_t word_size); 130 virtual HeapWord* allocate(size_t word_size);
132 virtual HeapWord* cas_allocate(size_t word_size); 131 virtual HeapWord* cas_allocate(size_t word_size);