Karya, built on 2018-05-31T02:46:59 (patch 0a1a35479c514820d77330ae8a978975ba22a47a)

Safe HaskellNone

Util.Memory

Contents

Description

Utilities dealing with memory usage.

TODO the SizeOf part can maybe be replaced by the weigh package.

Synopsis

Size

newtype Size Source #

Size in bytes.

Constructors

Size Integer 
Instances
Eq Size # 
Instance details

Defined in Util.Memory

Methods

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

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

Num Size # 
Instance details

Defined in Util.Memory

Methods

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

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

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

negate :: Size -> Size #

abs :: Size -> Size #

signum :: Size -> Size #

fromInteger :: Integer -> Size #

Ord Size # 
Instance details

Defined in Util.Memory

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 # 
Instance details

Defined in Util.Memory

Methods

showsPrec :: Int -> Size -> ShowS #

show :: Size -> String #

showList :: [Size] -> ShowS #

Pretty.Pretty Size # 
Instance details

Defined in Util.Memory

fromK :: RealFrac a => a -> Size Source #

fromM :: RealFrac a => a -> Size Source #

SizeOf

class SizeOf a where Source #

Minimal complete definition

sizeOf

Methods

sizeOf :: a -> Size Source #

Instances
SizeOf Char # 
Instance details

Defined in Util.Memory

Methods

sizeOf :: Char -> Size Source #

SizeOf Double # 
Instance details

Defined in Util.Memory

Methods

sizeOf :: Double -> Size Source #

SizeOf Float # 
Instance details

Defined in Util.Memory

Methods

sizeOf :: Float -> Size Source #

SizeOf Int # 
Instance details

Defined in Util.Memory

Methods

sizeOf :: Int -> Size Source #

SizeOf Word.Word8 # 
Instance details

Defined in Util.Memory

SizeOf a => SizeOf [a] # 
Instance details

Defined in Util.Memory

Methods

sizeOf :: [a] -> Size Source #

(SizeOf k, SizeOf a) => SizeOf (Map k a) # 
Instance details

Defined in Util.Memory

Methods

sizeOf :: Map k a -> Size Source #

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

Boxed word-sized datatype.

usage

rssVsize :: IO (Size, Size) Source #

Return OS-reported (RSS, VSIZE).

RTS

rtsAllocated :: IO Size Source #

Allocated memory according to the GHC RTS.