on master help sign in
Add a comment about newRounded
8eab0f0Harendra Kumar
core/src/Streamly/Internal/Data/MutByteArray/Type.hs+2
@@ -142,6 +142,8 @@ asUnpinnedPtrUnsafe arr f = do
142nil :: MutByteArray
142nil :: MutByteArray
143nil = unsafePerformIO $ new 0
143nil = unsafePerformIO $ new 0
144
144
145+-- XXX add "newRounded" to round up the large size to the next page boundary
146+-- and return the allocated size.
145{-# INLINE new #-}
147{-# INLINE new #-}
146new :: Int -> IO MutByteArray
148new :: Int -> IO MutByteArray
147new nbytes | nbytes < 0 =
149new nbytes | nbytes < 0 =