8024651: Remove the incorrect usage of Metablock::overhead()
Reviewed-by: brutisso, mgerdin, coleenp, jmasa
This commit is contained in:
parent
8a515de48c
commit
d2d4036f85
@ -50,13 +50,6 @@
|
||||
// Chunks, change Chunks so that they can be allocated out of a VirtualSpace.
|
||||
size_t Metablock::_min_block_byte_size = sizeof(Metablock);
|
||||
|
||||
#ifdef ASSERT
|
||||
size_t Metablock::_overhead =
|
||||
Chunk::aligned_overhead_size(sizeof(Metablock)) / BytesPerWord;
|
||||
#else
|
||||
size_t Metablock::_overhead = 0;
|
||||
#endif
|
||||
|
||||
// New blocks returned by the Metaspace are zero initialized.
|
||||
// We should fix the constructors to not assume this instead.
|
||||
Metablock* Metablock::initialize(MetaWord* p, size_t word_size) {
|
||||
|
@ -48,7 +48,6 @@ class Metablock VALUE_OBJ_CLASS_SPEC {
|
||||
} _header;
|
||||
} _block;
|
||||
static size_t _min_block_byte_size;
|
||||
static size_t _overhead;
|
||||
|
||||
typedef union block_t Block;
|
||||
typedef struct header_t Header;
|
||||
@ -73,7 +72,6 @@ class Metablock VALUE_OBJ_CLASS_SPEC {
|
||||
void set_prev(Metablock* v) { _block._header._prev = v; }
|
||||
|
||||
static size_t min_block_byte_size() { return _min_block_byte_size; }
|
||||
static size_t overhead() { return _overhead; }
|
||||
|
||||
bool is_free() { return header()->_word_size != 0; }
|
||||
void clear_next() { set_next(NULL); }
|
||||
|
@ -737,9 +737,7 @@ class SpaceManager : public CHeapObj<mtClass> {
|
||||
// MinChunkSize is a placeholder for the real minimum size JJJ
|
||||
size_t byte_size = word_size * BytesPerWord;
|
||||
|
||||
size_t byte_size_with_overhead = byte_size + Metablock::overhead();
|
||||
|
||||
size_t raw_bytes_size = MAX2(byte_size_with_overhead,
|
||||
size_t raw_bytes_size = MAX2(byte_size,
|
||||
Metablock::min_block_byte_size());
|
||||
raw_bytes_size = ARENA_ALIGN(raw_bytes_size);
|
||||
size_t raw_word_size = raw_bytes_size / BytesPerWord;
|
||||
|
Loading…
Reference in New Issue
Block a user