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