1

I'm trying to develop haskell replacement for less pager.

Full code is here https://github.com/purpleP/pager.git

buildInitialState :: IO TuiState
buildInitialState = do
    (file : args) <- getArgs
    bs <- mmapFileByteStringLazy file Nothing
    pure (TuiState (V.fromList (BC.lines bs)) 0)

That's how I read file. It works fine with files of 20Mb but doesn't work for 100Mb file. Am I doing something wrong or is this a bug in mmap library?

terminated by signal SIGSEGV (Address boundary error) Is the exact error I get.

user1685095
  • 5,787
  • 9
  • 51
  • 100

0 Answers0