Use binary search to speedup checkUnload
[ghc.git] / testsuite / tests / rts / linker / unload_multiple_objs / A.hs
1 module A where
2
3 import Foreign.StablePtr
4
5 id1 :: Int
6 id1 = 1
7
8 createHeapObjectA :: IO (StablePtr [Int])
9 createHeapObjectA = do
10 newStablePtr [2+id1]
11
12 freeHeapObjectA :: StablePtr [Int] -> IO ()
13 freeHeapObjectA obj = freeStablePtr obj
14
15 foreign export ccall createHeapObjectA :: IO (StablePtr [Int])
16 foreign export ccall freeHeapObjectA :: StablePtr [Int] -> IO ()