diff options
| author | Tom Smeding <tom@tomsmeding.com> | 2026-04-01 13:59:42 +0200 |
|---|---|---|
| committer | Tom Smeding <tom@tomsmeding.com> | 2026-04-01 13:59:42 +0200 |
| commit | 42b8b5fbcbe02b02878f8f6e2b98aafc713204be (patch) | |
| tree | 0201ef780d15ed92620bdcb8fd94dd6dac8ecd32 /src/Mmap.hs | |
| parent | 0cf6164927411cef088d9c8400a99327efdf0c19 (diff) | |
Cache, drop chronos
Diffstat (limited to 'src/Mmap.hs')
| -rw-r--r-- | src/Mmap.hs | 8 |
1 files changed, 5 insertions, 3 deletions
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 |
