44 // by make the underlying region interleaved (with UseNUMA).
45 //
46 // Invariant: bottom() <= top() <= end()
47 // top() and end() are exclusive.
48
49 class MutableSpace: public CHeapObj<mtGC> {
50 friend class VMStructs;
51
52 // The last region which page had been setup to be interleaved.
53 MemRegion _last_setup_region;
54 size_t _alignment;
55 HeapWord* _bottom;
56 HeapWord* volatile _top;
57 HeapWord* _end;
58
59 void numa_setup_pages(MemRegion mr, size_t page_size, bool clear_space);
60
61 void set_last_setup_region(MemRegion mr) { _last_setup_region = mr; }
62 MemRegion last_setup_region() const { return _last_setup_region; }
63
64 public:
65 virtual ~MutableSpace() = default;
66 MutableSpace(size_t page_size);
67
68 // Accessors
69 HeapWord* bottom() const { return _bottom; }
70 HeapWord* top() const { return _top; }
71 HeapWord* end() const { return _end; }
72
73 void set_bottom(HeapWord* value) { _bottom = value; }
74 virtual void set_top(HeapWord* value) { _top = value; }
75 void set_end(HeapWord* value) { _end = value; }
76
77 HeapWord* volatile* top_addr() { return &_top; }
78 HeapWord** end_addr() { return &_end; }
79
80 size_t alignment() { return _alignment; }
81
82 MemRegion region() const { return MemRegion(bottom(), end()); }
83
|
44 // by make the underlying region interleaved (with UseNUMA).
45 //
46 // Invariant: bottom() <= top() <= end()
47 // top() and end() are exclusive.
48
49 class MutableSpace: public CHeapObj<mtGC> {
50 friend class VMStructs;
51
52 // The last region which page had been setup to be interleaved.
53 MemRegion _last_setup_region;
54 size_t _alignment;
55 HeapWord* _bottom;
56 HeapWord* volatile _top;
57 HeapWord* _end;
58
59 void numa_setup_pages(MemRegion mr, size_t page_size, bool clear_space);
60
61 void set_last_setup_region(MemRegion mr) { _last_setup_region = mr; }
62 MemRegion last_setup_region() const { return _last_setup_region; }
63
64 template<bool COMPACT_HEADERS>
65 void object_iterate_impl(ObjectClosure* cl);
66
67 public:
68 virtual ~MutableSpace() = default;
69 MutableSpace(size_t page_size);
70
71 // Accessors
72 HeapWord* bottom() const { return _bottom; }
73 HeapWord* top() const { return _top; }
74 HeapWord* end() const { return _end; }
75
76 void set_bottom(HeapWord* value) { _bottom = value; }
77 virtual void set_top(HeapWord* value) { _top = value; }
78 void set_end(HeapWord* value) { _end = value; }
79
80 HeapWord* volatile* top_addr() { return &_top; }
81 HeapWord** end_addr() { return &_end; }
82
83 size_t alignment() { return _alignment; }
84
85 MemRegion region() const { return MemRegion(bottom(), end()); }
86
|