fix cache using wrong LRU value.

This commit is contained in:
Danila Fedorin 2019-05-28 22:38:23 -07:00
parent 1dd4d1af70
commit 7cababbe67

View File

@ -67,7 +67,7 @@ findEmptySlot =
findLruSlot : CacheSet -> Maybe Int findLruSlot : CacheSet -> Maybe Int
findLruSlot cs = findLruSlot cs =
let let
minLru = List.minimum <| List.map cacheSlotLru cs minLru = List.maximum <| List.map cacheSlotLru cs
isMin s = Just (cacheSlotLru s) == minLru isMin s = Just (cacheSlotLru s) == minLru
in in
intMapFind isMin cs intMapFind isMin cs