1 module MemoryManager ( ) where
3 import qualified Foreign.Marshal.Alloc as Alloc
5 import Foreign.Storable
7 class AllocationManager a where
8 mallocBytes :: a -> Int -> (a,Ptr b)
10 data TwoSpace = TwoSpace { basePtrA :: IntPtr, basePtrB :: IntPtr, heapPtrA :: IntPtr, heapPtrB :: IntPtr }
12 instance AllocationManager TwoSpace where
13 mallocBytes = mallocBytes'
15 mallocBytes' :: TwoSpace -> Int -> (TwoSpace, Ptr a)
16 mallocBytes' = undefined