Fix how we align our map to pagesize and sub our bigarray

This commit is contained in:
Calascibetta Romain 2025-01-07 14:14:11 +01:00
parent 6bef912ee7
commit 982260dc0e

View file

@ -490,7 +490,7 @@ let map ({ fd; map; _ } as t) ~pos:logical_address logical_len =
(len + (1 lsl t.pagesize)) land lnot ((1 lsl t.pagesize) - 1)
else len
in
let off = logical_address land ((t.pagesize lsl 1) - 1) in
let off = logical_address land ((1 lsl t.pagesize) - 1) in
if len <= 1 lsl t.pagesize then begin
let hash = hash 0l (page lsl t.pagesize) land ((1 lsl t.cachesize) - 1) in
match t.arr.(hash) with