X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=Mate%2FGarbageAlloc.hs;h=dc806b7418a99a90ab10fe3f5f1a77baacf4ca3f;hb=e86237a8a051d37d42be21d469c36aacf8a86e8f;hp=5dccda0f806332ec2e6cd7ba401d46865ea9b32d;hpb=9c9a4d2b3c41546fc7995b106181ef4f987f4281;p=mate.git diff --git a/Mate/GarbageAlloc.hs b/Mate/GarbageAlloc.hs index 5dccda0..dc806b7 100644 --- a/Mate/GarbageAlloc.hs +++ b/Mate/GarbageAlloc.hs @@ -8,14 +8,15 @@ module Mate.GarbageAlloc( getHeapMemory, printMemoryUsage, mallocStringVM, - mallocObjectVM) where + mallocObjectVM, + printGCStats) where import Foreign import Foreign.C import Mate.GC.Boehm -import Text.Printf +--import Text.Printf import Mate.Debug -- unified place for allocating Memory @@ -49,17 +50,13 @@ mallocObjectVM size = do 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 + +foreign export ccall printGCStats :: IO () +printGCStats :: IO () +printGCStats = putStrLn "Should print GC Stats"