mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Make MappedFile::map return a const correct pointer, don't leak address space on Unix platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49026 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -65,15 +65,13 @@ namespace sys {
|
||||
return initialize(ErrMsg);
|
||||
}
|
||||
|
||||
/// unmap - Remove the mapped file from memory. If the file was mapped for
|
||||
/// write access, the memory contents will be automatically synchronized
|
||||
/// with the file's disk contents.
|
||||
/// unmap - Remove the mapped file from memory.
|
||||
void unmap();
|
||||
|
||||
/// map - Reserve space for the file, map it into memory, and return a
|
||||
/// pointer to it. This returns the base memory address of the mapped file
|
||||
/// or 0 if an error occurred.
|
||||
void *map(std::string* ErrMsg = 0);
|
||||
const void *map(std::string* ErrMsg = 0);
|
||||
|
||||
void close() { if (MapInfo) terminate(); }
|
||||
|
||||
|
Reference in New Issue
Block a user