diff options
author | Ladislav Zezula <zezula@volny.cz> | 2021-04-01 18:32:40 +0200 |
---|---|---|
committer | Ladislav Zezula <zezula@volny.cz> | 2021-04-01 18:32:40 +0200 |
commit | ba5fe7b17e387a4f4bb92d10a4ecf7f57b7454fe (patch) | |
tree | 4eeef5b8e7de6bdfecd134ce76e763d619a5d7de /src/FileStream.cpp | |
parent | 48f26f9f75a840a31b86a245f974009edf6d90bf (diff) |
munmap as well
Diffstat (limited to 'src/FileStream.cpp')
-rw-r--r-- | src/FileStream.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/FileStream.cpp b/src/FileStream.cpp index bfb5817..7268923 100644 --- a/src/FileStream.cpp +++ b/src/FileStream.cpp @@ -631,14 +631,17 @@ static bool BaseMap_Read( static void BaseMap_Close(TFileStream * pStream)
{
+
#ifdef STORMLIB_WINDOWS
+
if(pStream->Base.Map.pbFile != NULL)
UnmapViewOfFile(pStream->Base.Map.pbFile);
-#endif
-#if defined(STORMLIB_MAC) || defined(STORMLIB_LINUX)
+#elif defined(STORMLIB_HAS_MMAP)
+
if(pStream->Base.Map.pbFile != NULL)
munmap(pStream->Base.Map.pbFile, (size_t )pStream->Base.Map.FileSize);
+
#endif
pStream->Base.Map.pbFile = NULL;
|