Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 APR 来映射大于 4Gb 的非常大的文件。起初我需要创建这么大的文件,但我发现该函数apr_file_seek接受的类型参数apr_seek_where_t只是 int 的别名。因此,可以只寻找前 4 场演出。是否可以使用 APR 处理大文件?
apr_file_seek
apr_seek_where_t
您可以使用 APR_CUR 进行多次搜索。 另请注意,int在 32 位系统上,您可以两个向前搜索两个千兆字节,而不是四个。
int
另请注意,在 32 位系统上,mmap很可能无法映射超过两到三个千兆字节。(当地址空间受 32 位限制时,最大地址空间为 4 GB,但操作系统必须为自己保留一些地址空间)。
mmap