madvise and write working