madvise had wrong values for length