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