projects
/
mate.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MethodPool: removed demo call stuff - added printGCStats instead;
[mate.git]
/
Mate
/
GarbageAlloc.hs
diff --git
a/Mate/GarbageAlloc.hs
b/Mate/GarbageAlloc.hs
index 5dccda0f806332ec2e6cd7ba401d46865ea9b32d..dc806b7418a99a90ab10fe3f5f1a77baacf4ca3f 100644
(file)
--- a/
Mate/GarbageAlloc.hs
+++ b/
Mate/GarbageAlloc.hs
@@
-8,14
+8,15
@@
module Mate.GarbageAlloc(
getHeapMemory,
printMemoryUsage,
mallocStringVM,
getHeapMemory,
printMemoryUsage,
mallocStringVM,
- mallocObjectVM) where
+ mallocObjectVM,
+ printGCStats) where
import Foreign
import Foreign.C
import Mate.GC.Boehm
import Foreign
import Foreign.C
import Mate.GC.Boehm
-import Text.Printf
+
--
import Text.Printf
import Mate.Debug
-- unified place for allocating Memory
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
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
getHeapMemory :: IO Int
getHeapMemory = getHeapSizeGC
-
foreign export ccall printMemoryUsage :: IO ()
printMemoryUsage :: IO ()
printMemoryUsage = getHeapMemory >>= print
foreign export ccall printMemoryUsage :: IO ()
printMemoryUsage :: IO ()
printMemoryUsage = getHeapMemory >>= print
+
+foreign export ccall printGCStats :: IO ()
+printGCStats :: IO ()
+printGCStats = putStrLn "Should print GC Stats"