Portability | Linux |
---|---|
Stability | testing |
Maintainer | ongy |
Safe Haskell | Safe-Inferred |
- data MemoryHandle
- getMemoryAvailable :: MemoryHandle -> IO Int
- getMemoryHandle :: IO MemoryHandle
- getMemoryTotal :: MemoryHandle -> IO Int
- getMemoryUsed :: MemoryHandle -> IO Int
- getMemoryFree :: MemoryHandle -> IO Int
- getMemoryStats :: MemoryHandle -> IO (Int, Int, Int, Int)
Documentation
data MemoryHandle Source
The memory handle used for all functions
getMemoryAvailable :: MemoryHandle -> IO IntSource
Return the memory available to userspace
This is accurate (read from kernel) for current kernels. Old kernel (~3.13) estimates this. Old kernels may overestimate.
getMemoryHandle :: IO MemoryHandleSource
Get a memory handle
getMemoryTotal :: MemoryHandle -> IO IntSource
Get the total amount of memory in the system
getMemoryUsed :: MemoryHandle -> IO IntSource
Get the amount of memory used by the kernel and processes
getMemoryFree :: MemoryHandle -> IO IntSource
Get the amount of memory rported as free by the kernel
getMemoryStats :: MemoryHandle -> IO (Int, Int, Int, Int)Source
Get memory statistics in one got (with only one read) (total, avail, free, used)