move data file size limit check to mmap library