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