From 42b8b5fbcbe02b02878f8f6e2b98aafc713204be Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Wed, 1 Apr 2026 13:59:42 +0200 Subject: Cache, drop chronos --- src/Mmap.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Mmap.hs') diff --git a/src/Mmap.hs b/src/Mmap.hs index bfe6042..94f5c49 100644 --- a/src/Mmap.hs +++ b/src/Mmap.hs @@ -45,6 +45,8 @@ mapFile path = mask_ $ do -- fail (and no exceptions are coming from outside as we're masked) if addr == nullPtr then fail "mapFile: could not mmap" - else BS.unsafePackCStringFinalizer addr (fromIntegral @CSize @Int filelen) - (do -- putStrLn ("[munmap " ++ show addr ++ "]") - c_munmap addr filelen) + else do bs <- BS.unsafePackCStringFinalizer addr (fromIntegral @CSize @Int filelen) + (do -- putStrLn ("[munmap " ++ show addr ++ "]") + c_munmap addr filelen) + -- putStrLn ("[mmap " ++ show addr ++ "]") + return bs -- cgit v1.3