Add a comment about newRounded
commit8eab0f07cd8a6b2e3085f3a0bf67bb04a8bb08f5
authorHarendra Kumar <harendra@composewell.com>
dateThu 11 Jan 2024, 13:23 (3 years ago)
parent63f9adf
core/src/Streamly/Internal/Data/MutByteArray/Type.hs+2
@@ -142,6 +142,8 @@ asUnpinnedPtrUnsafe arr f = do
142142nil :: MutByteArray
143143nil = unsafePerformIO $ new 0
144144
145+-- XXX add "newRounded" to round up the large size to the next page boundary
146+-- and return the allocated size.
145147{-# INLINE new #-}
146148new :: Int -> IO MutByteArray
147149new nbytes | nbytes < 0 =