support for larger (>32kib) files, more flexible getpage()