[Git][ghc/ghc][wip/T24228] base: export System.Mem.performBlockingMajorGC
Teo Camarasu (@teo)
gitlab at gitlab.haskell.org
Wed Nov 29 14:29:25 UTC 2023
Teo Camarasu pushed to branch wip/T24228 at Glasgow Haskell Compiler / GHC
Commits:
919f2f8f by Teo Camarasu at 2023-11-29T14:29:17+00:00
base: export System.Mem.performBlockingMajorGC
The corresponding C function was introduced in
ba73a807edbb444c49e0cf21ab2ce89226a77f2e. As part of #22264.
Resolves #24228
- - - - -
5 changed files:
- libraries/base/src/System/Mem.hs
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/interface-stability/base-exports.stdout-ws-32
Changes:
=====================================
libraries/base/src/System/Mem.hs
=====================================
@@ -20,6 +20,7 @@ module System.Mem
-- * Garbage collection
performGC
, performMajorGC
+ , performBlockingMajorGC
, performMinorGC
-- * Allocation counter and limits
@@ -40,6 +41,12 @@ performGC = performMajorGC
-- @since 4.7.0.0
foreign import ccall "performMajorGC" performMajorGC :: IO ()
+-- | Triggers an immediate major garbage collection, ensuring that collection
+-- finishes before returning.
+--
+-- @since 4.20.0.0
+foreign import ccall "performBlockingMajorGC" performBlockingMajorGC :: IO ()
+
-- | Triggers an immediate minor garbage collection.
--
-- @since 4.7.0.0
=====================================
testsuite/tests/interface-stability/base-exports.stdout
=====================================
@@ -10279,6 +10279,7 @@ module System.Mem where
disableAllocationLimit :: GHC.Types.IO ()
enableAllocationLimit :: GHC.Types.IO ()
getAllocationCounter :: GHC.Types.IO GHC.Int.Int64
+ performBlockingMajorGC :: GHC.Types.IO ()
performGC :: GHC.Types.IO ()
performMajorGC :: GHC.Types.IO ()
performMinorGC :: GHC.Types.IO ()
=====================================
testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
=====================================
@@ -13057,6 +13057,7 @@ module System.Mem where
disableAllocationLimit :: GHC.Types.IO ()
enableAllocationLimit :: GHC.Types.IO ()
getAllocationCounter :: GHC.Types.IO GHC.Int.Int64
+ performBlockingMajorGC :: GHC.Types.IO ()
performGC :: GHC.Types.IO ()
performMajorGC :: GHC.Types.IO ()
performMinorGC :: GHC.Types.IO ()
=====================================
testsuite/tests/interface-stability/base-exports.stdout-mingw32
=====================================
@@ -10565,6 +10565,7 @@ module System.Mem where
disableAllocationLimit :: GHC.Types.IO ()
enableAllocationLimit :: GHC.Types.IO ()
getAllocationCounter :: GHC.Types.IO GHC.Int.Int64
+ performBlockingMajorGC :: GHC.Types.IO ()
performGC :: GHC.Types.IO ()
performMajorGC :: GHC.Types.IO ()
performMinorGC :: GHC.Types.IO ()
=====================================
testsuite/tests/interface-stability/base-exports.stdout-ws-32
=====================================
@@ -10283,6 +10283,7 @@ module System.Mem where
disableAllocationLimit :: GHC.Types.IO ()
enableAllocationLimit :: GHC.Types.IO ()
getAllocationCounter :: GHC.Types.IO GHC.Int.Int64
+ performBlockingMajorGC :: GHC.Types.IO ()
performGC :: GHC.Types.IO ()
performMajorGC :: GHC.Types.IO ()
performMinorGC :: GHC.Types.IO ()
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/919f2f8ff508f459f8b9beafaa8359a7c787a096
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/919f2f8ff508f459f8b9beafaa8359a7c787a096
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231129/7c4ce292/attachment-0001.html>
More information about the ghc-commits
mailing list