diff options
Diffstat (limited to 'ExpensiveHash.hs')
-rw-r--r-- | ExpensiveHash.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ExpensiveHash.hs b/ExpensiveHash.hs index 5799d83..6d1e6c8 100644 --- a/ExpensiveHash.hs +++ b/ExpensiveHash.hs @@ -77,7 +77,7 @@ getNumCores :: IO Integer getNumCores = getmax . mapMaybe parse . lines <$> readFile "/proc/cpuinfo" where getmax [] = error "Unknown number of physical cores." - getmax l = maximum l + getmax l = maximum l + 1 -- add 1 because /proc/cpuinfo counts from 0 parse l | "core id" `isPrefixOf` l = readMaybe $ dropWhile (/= ':') l | otherwise = Nothing |