[Git][ghc/ghc][master] base: export System.Mem.performBlockingMajorGC
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Fri Feb 16 18:37:33 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
08031ada by Teo Camarasu at 2024-02-16T13:37:00-05:00
base: export System.Mem.performBlockingMajorGC
The corresponding C function was introduced in
ba73a807edbb444c49e0cf21ab2ce89226a77f2e. As part of #22264.
Resolves #24228
The CLC proposal was disccused at: https://github.com/haskell/core-libraries-committee/issues/230
Co-authored-by: Ben Gamari <bgamari.foss at gmail.com>
- - - - -
6 changed files:
- libraries/base/changelog.md
- libraries/ghc-internal/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/changelog.md
=====================================
@@ -16,6 +16,7 @@
([CLC proposal #166](https://github.com/haskell/core-libraries-committee/issues/166))
* Export List from Data.List ([CLC proposal #182](https://github.com/haskell/core-libraries-committee/issues/182)).
* Deprecate `Data.List.NonEmpty.unzip` ([CLC proposal #86](https://github.com/haskell/core-libraries-committee/issues/86))
+ * Add `System.Mem.performMajorGC` ([CLC proposal #230](https://github.com/haskell/core-libraries-committee/issues/230))
* Fix exponent overflow/underflow bugs in the `Read` instances for `Float` and `Double` ([CLC proposal #192](https://github.com/haskell/core-libraries-committee/issues/192))
* Implement `many` and `some` methods of `instance Alternative (Compose f g)` explicitly. ([CLC proposal #181](https://github.com/haskell/core-libraries-committee/issues/181))
=====================================
libraries/ghc-internal/src/System/Mem.hs
=====================================
@@ -20,6 +20,7 @@ module System.Mem
-- * Garbage collection
performGC
, performMajorGC
+ , performBlockingMajorGC
, performMinorGC
-- * Allocation counter and limits
@@ -41,6 +42,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
=====================================
@@ -10365,6 +10365,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
=====================================
@@ -13143,6 +13143,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
=====================================
@@ -10651,6 +10651,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
=====================================
@@ -10369,6 +10369,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/08031ada3fa2e3bbdef31449bec085fda6149683
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/08031ada3fa2e3bbdef31449bec085fda6149683
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/20240216/a1748384/attachment-0001.html>
More information about the ghc-commits
mailing list