Skip to content

Commit 86fcbc7

Browse files
authored
Merge pull request #31297 from JuliaLang/ksh/mem
Doc free_memory and total_memory
2 parents 023c8e4 + 27cc988 commit 86fcbc7

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

base/sysinfo.jl

+11
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,18 @@ function loadavg()
234234
return loadavg_
235235
end
236236

237+
"""
238+
Sys.free_memory()
239+
240+
Get the total free memory in RAM in kilobytes.
241+
"""
237242
free_memory() = ccall(:uv_get_free_memory, UInt64, ())
243+
244+
"""
245+
Sys.total_memory()
246+
247+
Get the total memory in RAM (including that which is currently used) in kilobytes.
248+
"""
238249
total_memory() = ccall(:uv_get_total_memory, UInt64, ())
239250

240251
"""

doc/src/base/base.md

+2
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ Base.Sys.isnetbsd
306306
Base.Sys.isdragonfly
307307
Base.Sys.iswindows
308308
Base.Sys.windows_version
309+
Base.Sys.free_memory
310+
Base.Sys.total_memory
309311
Base.@static
310312
```
311313

0 commit comments

Comments
 (0)