mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8324598: use mem_unit when working with sysinfo memory and swap related information
Reviewed-by: dholmes, mdoerr
This commit is contained in:
parent
6d36eb78ad
commit
7a798d3ceb
2 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Red Hat, Inc.
|
||||
* Copyright (c) 2020, 2024, Red Hat, Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -54,5 +54,5 @@ Java_jdk_internal_platform_CgroupMetrics_getTotalSwapSize0
|
|||
if (retval < 0) {
|
||||
return 0; // syinfo failed, treat as no swap
|
||||
}
|
||||
return (jlong)si.totalswap;
|
||||
return (jlong)(si.totalswap * si.mem_unit);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue