64
65 class FreeBlock: public HeapBlock {
66 friend class VMStructs;
67 protected:
68 FreeBlock* _link;
69
70 public:
71 // Initialization
72 void initialize(size_t length) { HeapBlock::initialize(length); _link= NULL; }
73
74 // Merging
75 void set_length(size_t l) { _header._length = l; }
76
77 // Accessors
78 FreeBlock* link() const { return _link; }
79 void set_link(FreeBlock* link) { _link = link; }
80 };
81
82 class CodeHeap : public CHeapObj<mtCode> {
83 friend class VMStructs;
84 friend class PregeneratedCodeHeap;
85 protected:
86 VirtualSpace _memory; // the memory holding the blocks
87 VirtualSpace _segmap; // the memory holding the segment map
88
89 size_t _number_of_committed_segments;
90 size_t _number_of_reserved_segments;
91 size_t _segment_size;
92 int _log2_segment_size;
93
94 size_t _next_segment;
95
96 FreeBlock* _freelist;
97 size_t _freelist_segments; // No. of segments in freelist
98 int _freelist_length;
99 size_t _max_allocated_capacity; // Peak capacity that was allocated during lifetime of the heap
100
101 const char* _name; // Name of the CodeHeap
102 const int _code_blob_type; // CodeBlobType it contains
103 int _blob_count; // Number of CodeBlobs
104 int _nmethod_count; // Number of nmethods
|
64
65 class FreeBlock: public HeapBlock {
66 friend class VMStructs;
67 protected:
68 FreeBlock* _link;
69
70 public:
71 // Initialization
72 void initialize(size_t length) { HeapBlock::initialize(length); _link= NULL; }
73
74 // Merging
75 void set_length(size_t l) { _header._length = l; }
76
77 // Accessors
78 FreeBlock* link() const { return _link; }
79 void set_link(FreeBlock* link) { _link = link; }
80 };
81
82 class CodeHeap : public CHeapObj<mtCode> {
83 friend class VMStructs;
84 protected:
85 VirtualSpace _memory; // the memory holding the blocks
86 VirtualSpace _segmap; // the memory holding the segment map
87
88 size_t _number_of_committed_segments;
89 size_t _number_of_reserved_segments;
90 size_t _segment_size;
91 int _log2_segment_size;
92
93 size_t _next_segment;
94
95 FreeBlock* _freelist;
96 size_t _freelist_segments; // No. of segments in freelist
97 int _freelist_length;
98 size_t _max_allocated_capacity; // Peak capacity that was allocated during lifetime of the heap
99
100 const char* _name; // Name of the CodeHeap
101 const int _code_blob_type; // CodeBlobType it contains
102 int _blob_count; // Number of CodeBlobs
103 int _nmethod_count; // Number of nmethods
|