fix madvise bug