8296796: Provide clean, platform-agnostic interface to C-heap trimming

Reviewed-by: dholmes, rkennke
This commit is contained in:
Thomas Stuefe 2022-11-19 11:52:55 +00:00
parent c50a9047b4
commit 0845b39caf
10 changed files with 108 additions and 53 deletions

View file

@ -372,6 +372,9 @@ inline T byte_size_in_proper_unit(T s) {
}
}
#define PROPERFMT SIZE_FORMAT "%s"
#define PROPERFMTARGS(s) byte_size_in_proper_unit(s), proper_unit_for_byte_size(s)
inline const char* exact_unit_for_byte_size(size_t s) {
#ifdef _LP64
if (s >= G && (s % G) == 0) {