GC: added newRef field
[mate.git] / Mate / MemoryManager.hs
index 57aec48cfed67a98f7cd74df9c3403c90f5efef5..988c3608bd4b1bf5558dc489812ceb7df86c420e 100644 (file)
@@ -34,10 +34,14 @@ mallocBytes' bytes = do state <- get
                              return $ intPtrToPtr ptr
         fail = error "no space left in two space (mallocBytes')"
 
--- here its time for monadtransformer :)
-evacuate :: [Ptr a] -> State TwoSpace (IO (HashTable (Ptr a) (Ptr a)))
+type Action = IO ()
+
+evacuate :: RefObj a => [a] -> State TwoSpace Action
 evacuate = undefined
 
+evacuate' :: RefObj a => a -> State TwoSpace Action
+evacuate' = undefined
+
 
 initTwoSpace :: Int -> IO TwoSpace
 initTwoSpace size =  do printf "initializing TwoSpace memory manager with %d bytes." size