--- TODO: delete me
-foreign export ccall demoInterfaceCall :: CUInt -> IO ()
-demoInterfaceCall :: CUInt -> IO ()
-demoInterfaceCall val = do
- printf "demoInterfaceCall: 0x%08x\n" (fromIntegral val :: Word32)
- return ()
+mallocStringUnmanaged :: Int -> IO (Ptr a)
+mallocStringUnmanaged size = do
+ printfStr $ printf "mallocStringUnamaged: %d\n" size
+ mallocBytes size
+
+
+getHeapMemory :: IO Int
+getHeapMemory = getHeapSizeGC
+
+foreign export ccall printMemoryUsage :: IO ()
+printMemoryUsage :: IO ()
+printMemoryUsage = getHeapMemory >>= print
+
+foreign export ccall printGCStats :: IO ()
+printGCStats :: IO ()
+printGCStats = putStrLn "Should print GC Stats"