+
+mallocObjectVM :: Int -> IO CPtrdiff
+mallocObjectVM size = do
+ ptr <- mallocBytes size
+ printfStr "mallocObject VM: %d\n" size
+ return $ fromIntegral $ ptrToIntPtr ptr
+
+-- TODO: delete me
+foreign export ccall demoInterfaceCall :: CUInt -> IO ()
+demoInterfaceCall :: CUInt -> IO ()
+demoInterfaceCall val = do
+ printf "demoInterfaceCall: 0x%08x\n" (fromIntegral val :: Word32)
+ return ()
+
+getHeapMemory :: IO Int
+getHeapMemory = getHeapSizeGC
+
+
+foreign export ccall printMemoryUsage :: IO ()
+printMemoryUsage :: IO ()
+printMemoryUsage = getHeapMemory >>= print