add pagesize logic to support ARM64 devices