Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __CS_CSUTIL_MMAP_POSIX_H__
00021 #define __CS_CSUTIL_MMAP_POSIX_H__
00022
00023 #include "csextern.h"
00024
00035 class CS_CRYSTALSPACE_EXPORT csPlatformMemoryMappingPosix
00036 {
00037 protected:
00038 struct PlatformMemoryMapping
00039 {
00040 void* realPtr;
00041 size_t realSize;
00042 };
00043
00044 int hMappedFile;
00045 size_t granularity;
00046
00048 csPlatformMemoryMappingPosix ();
00050 ~csPlatformMemoryMappingPosix ();
00051
00052 bool OpenNative (const char* filename);
00053 bool Ok() { return hMappedFile != -1; }
00054 size_t GetMaxSize ();
00055
00063 void MapWindow (PlatformMemoryMapping& mapping, size_t offset, size_t len);
00065 void UnmapWindow (PlatformMemoryMapping& mapping);
00066 };
00067
00068
00069 #endif // __CS_CSUTIL_MMAP_POSIX_H__