Commit 8e828570 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

Changelog entry and /Since/ for alloc-counter ops

See b0534f78 for more details

[skip ci]
parent 5c354154
......@@ -193,6 +193,7 @@ instance Ord ThreadId where
--
-- Allocation accounting is accurate only to about 4Kbytes.
--
-- /Since: 4.8.0.0/
setAllocationCounter :: Int64 -> IO ()
setAllocationCounter i = do
ThreadId t <- myThreadId
......@@ -200,6 +201,8 @@ setAllocationCounter i = do
-- | Return the current value of the allocation counter for the
-- current thread.
--
-- /Since: 4.8.0.0/
getAllocationCounter :: IO Int64
getAllocationCounter = do
ThreadId t <- myThreadId
......@@ -224,12 +227,15 @@ getAllocationCounter = do
-- Compared to using timeouts, allocation limits don't count time
-- spent blocked or in foreign calls.
--
-- /Since: 4.8.0.0/
enableAllocationLimit :: IO ()
enableAllocationLimit = do
ThreadId t <- myThreadId
rts_enableThreadAllocationLimit t
-- | Disable allocation limit processing for the current thread.
--
-- /Since: 4.8.0.0/
disableAllocationLimit :: IO ()
disableAllocationLimit = do
ThreadId t <- myThreadId
......
......@@ -102,6 +102,8 @@ instance Show Deadlock where
-- |This thread has exceeded its allocation limit. See
-- 'GHC.Conc.setAllocationCounter' and
-- 'GHC.Conc.enableAllocationLimit'.
--
-- /Since: 4.8.0.0/
data AllocationLimitExceeded = AllocationLimitExceeded
deriving Typeable
......
......@@ -119,6 +119,15 @@
* New module `GHC.RTS.Flags` that provides accessors to runtime flags.
* Expose functions for per-thread allocation counters and limits in `GHC.Conc`
disableAllocationLimit :: IO ()
enableAllocationLimit :: IO ()
getAllocationCounter :: IO Int64
setAllocationCounter :: Int64 -> IO ()
together with a new exception `AllocationLimitExceeded`.
## 4.7.0.1 *Jul 2014*
* Bundled with GHC 7.8.3
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment