![]() |
Public API Reference |
![]() |
Memory mapping for platforms with POSIX mmap() support. More...
#include <csutil/mmap_posix.h>
Protected Member Functions | |
csPlatformMemoryMappingPosix () | |
Create a new mapping. | |
void | MapWindow (PlatformMemoryMapping &mapping, size_t offset, size_t len) |
Map a part of the file into memory and return a pointer to mapped data. | |
void | UnmapWindow (PlatformMemoryMapping &mapping) |
Unmap a mapping of the file. | |
~csPlatformMemoryMappingPosix () | |
Destroy file mapping. |
Memory mapping for platforms with POSIX mmap() support.
Definition at line 35 of file mmap_posix.h.
csPlatformMemoryMappingPosix::csPlatformMemoryMappingPosix | ( | ) | [protected] |
Create a new mapping.
csPlatformMemoryMappingPosix::~csPlatformMemoryMappingPosix | ( | ) | [protected] |
Destroy file mapping.
void csPlatformMemoryMappingPosix::MapWindow | ( | PlatformMemoryMapping & | mapping, |
size_t | offset, | ||
size_t | len | ||
) | [protected] |
Map a part of the file into memory and return a pointer to mapped data.
offset and len are the offset and length of the part of the file to map. Both should be multiples of the granularity returned by GetPageGranularity(); otherwise, the function may fail. Returns 0 in case of failure.
void csPlatformMemoryMappingPosix::UnmapWindow | ( | PlatformMemoryMapping & | mapping | ) | [protected] |
Unmap a mapping of the file.