问题
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.
来源:https://stackoverflow.com/questions/53715138/address-boundary-error-in-haskell-application