diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2023-03-03 00:06:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 00:06:19 -0500 |
commit | 8cc763cc1b9741349805fd658308cc34ddba2a4f (patch) | |
tree | 949fadbd8e64f9096ef03a027ab678e1778b3e83 /src/utils/gen_util.rs | |
parent | c2d94900f31305176781950278bc629d399f41f3 (diff) |
refactor: migrate memory collection to sysinfo for all platforms (#1036)
* cleanup
* refactor: remove heim memory code
* add missing updates, remove heim memory feature
* restrict export visibility
* some refactoring, remove smol
* gpu feature
Diffstat (limited to 'src/utils/gen_util.rs')
-rw-r--r-- | src/utils/gen_util.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utils/gen_util.rs b/src/utils/gen_util.rs index 5f41d2c5..28cb558e 100644 --- a/src/utils/gen_util.rs +++ b/src/utils/gen_util.rs @@ -9,18 +9,18 @@ pub const MEGA_LIMIT: u64 = 1_000_000; pub const GIGA_LIMIT: u64 = 1_000_000_000; pub const TERA_LIMIT: u64 = 1_000_000_000_000; pub const KIBI_LIMIT: u64 = 1024; -pub const MEBI_LIMIT: u64 = 1_048_576; -pub const GIBI_LIMIT: u64 = 1_073_741_824; -pub const TEBI_LIMIT: u64 = 1_099_511_627_776; +pub const MEBI_LIMIT: u64 = 1024 * 1024; +pub const GIBI_LIMIT: u64 = 1024 * 1024 * 1024; +pub const TEBI_LIMIT: u64 = 1024 * 1024 * 1024 * 1024; pub const KILO_LIMIT_F64: f64 = 1000.0; pub const MEGA_LIMIT_F64: f64 = 1_000_000.0; pub const GIGA_LIMIT_F64: f64 = 1_000_000_000.0; pub const TERA_LIMIT_F64: f64 = 1_000_000_000_000.0; pub const KIBI_LIMIT_F64: f64 = 1024.0; -pub const MEBI_LIMIT_F64: f64 = 1_048_576.0; -pub const GIBI_LIMIT_F64: f64 = 1_073_741_824.0; -pub const TEBI_LIMIT_F64: f64 = 1_099_511_627_776.0; +pub const MEBI_LIMIT_F64: f64 = 1024.0 * 1024.0; +pub const GIBI_LIMIT_F64: f64 = 1024.0 * 1024.0 * 1024.0; +pub const TEBI_LIMIT_F64: f64 = 1024.0 * 1024.0 * 1024.0 * 1024.0; pub const LOG_KILO_LIMIT: f64 = 3.0; pub const LOG_MEGA_LIMIT: f64 = 6.0; |