Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Util.Memory

Description

Utilities dealing with memory usage.

Synopsis

Documentation

class Bytes a where Source #

Minimal complete definition

bytes

Methods

bytes :: a -> Size Source #

Instances

Bytes Char # 

Methods

bytes :: Char -> Size Source #

Bytes Double # 

Methods

bytes :: Double -> Size Source #

Bytes Float # 

Methods

bytes :: Float -> Size Source #

Bytes Int # 

Methods

bytes :: Int -> Size Source #

Bytes Word.Word8 # 
Bytes a => Bytes [a] # 

Methods

bytes :: [a] -> Size Source #

(Bytes k, Bytes a) => Bytes (Map k a) # 

Methods

bytes :: Map k a -> Size Source #

newtype Size Source #

Size in bytes.

Constructors

Size Int 

Instances

Eq Size # 

Methods

(==) :: Size -> Size -> Bool #

(/=) :: Size -> Size -> Bool #

Num Size # 

Methods

(+) :: Size -> Size -> Size #

(-) :: Size -> Size -> Size #

(*) :: Size -> Size -> Size #

negate :: Size -> Size #

abs :: Size -> Size #

signum :: Size -> Size #

fromInteger :: Integer -> Size #

Ord Size # 

Methods

compare :: Size -> Size -> Ordering #

(<) :: Size -> Size -> Bool #

(<=) :: Size -> Size -> Bool #

(>) :: Size -> Size -> Bool #

(>=) :: Size -> Size -> Bool #

max :: Size -> Size -> Size #

min :: Size -> Size -> Size #

Show Size # 

Methods

showsPrec :: Int -> Size -> ShowS #

show :: Size -> String #

showList :: [Size] -> ShowS #

Pretty.Pretty Size # 

boxed_storable :: Storable a => a -> Size Source #

Boxed word-sized datatype.

memory_usage :: IO (Size, Size) Source #

Return (RSS, VSIZE).