[Git][ghc/ghc][wip/T24228] base: export System.Mem.performBlockingMajorGC

Teo Camarasu (@teo) gitlab at gitlab.haskell.org
Wed Nov 29 14:13:28 UTC 2023



Teo Camarasu pushed to branch wip/T24228 at Glasgow Haskell Compiler / GHC


Commits:
1aa35911 by Teo Camarasu at 2023-11-29T14:13:13+00:00
base: export System.Mem.performBlockingMajorGC

The corresponding C function was introduced in
ba73a807edbb444c49e0cf21ab2ce89226a77f2e. As part of #22264.

Resolves #24228

- - - - -


6 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
- + testsuite/tests/rts/T23397


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
+  performMajorGC :: GHC.Types.IO ()
   performGC :: GHC.Types.IO ()
   performMajorGC :: GHC.Types.IO ()
   performMinorGC :: GHC.Types.IO ()


=====================================
testsuite/tests/rts/T23397
=====================================
Binary files /dev/null and b/testsuite/tests/rts/T23397 differ



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1aa359114360d21cebc06aeaa78623f22c1771ab

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1aa359114360d21cebc06aeaa78623f22c1771ab
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/86ef9086/attachment-0001.html>


More information about the ghc-commits mailing list