-
Bug
-
Resolution: Fixed
-
P2
-
hs25
-
b51
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8025370 | 8 | Stefan Karlsson | P2 | Closed | Fixed | b109 |
In the following code we add byte_size with the Metablock::overhead(), which returns words and not bytes.
size_t get_raw_word_size(size_t word_size) {
// If only the dictionary is going to be used (i.e., no
// indexed free list), then there is a minimum size requirement.
// 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,
Metablock::min_block_byte_size());
raw_bytes_size = ARENA_ALIGN(raw_bytes_size);
size_t raw_word_size = raw_bytes_size / BytesPerWord;
assert(raw_word_size * BytesPerWord == raw_bytes_size, "Size problem");
return raw_word_size;
}
The code has changed since it was first written, and currently we overwrite the entire Metablock without leaving a header. Because of this we don't have any overhead any more.
Metablock::overhead() is zero in product builds and non-zero in debug builds.
size_t get_raw_word_size(size_t word_size) {
// If only the dictionary is going to be used (i.e., no
// indexed free list), then there is a minimum size requirement.
// 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,
Metablock::min_block_byte_size());
raw_bytes_size = ARENA_ALIGN(raw_bytes_size);
size_t raw_word_size = raw_bytes_size / BytesPerWord;
assert(raw_word_size * BytesPerWord == raw_bytes_size, "Size problem");
return raw_word_size;
}
The code has changed since it was first written, and currently we overwrite the entire Metablock without leaving a header. Because of this we don't have any overhead any more.
Metablock::overhead() is zero in product builds and non-zero in debug builds.
- backported by
-
JDK-8025370 Remove the incorrect usage of Metablock::overhead()
-
- Closed
-
- blocks
-
JDK-8024547 MaxMetaspaceSize should limit the committed memory used by the metaspaces
-
- Closed
-
-
JDK-8024763 [duplicate] MaxMetaspaceSize should limit the committed memory used by the metaspaces
-
- Closed
-