MemoryMappedFile.h 523 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include <map>
  3. #include "os/File.h"
  4. #include "os/Mutex.h"
  5. #include "os/MemoryMappedFile.h"
  6. namespace il2cpp
  7. {
  8. namespace utils
  9. {
  10. class MemoryMappedFile
  11. {
  12. public:
  13. static void* Map(os::FileHandle* file);
  14. static void* Map(os::FileHandle* file, int64_t length, int64_t offset);
  15. static void* Map(os::FileHandle* file, int64_t length, int64_t offset, int32_t access);
  16. static bool Unmap(void* address);
  17. static bool Unmap(void* address, int64_t length);
  18. };
  19. }
  20. }