gem5
v20.0.0.2
|
MappedFileBuffer is a wrapper around a region of host memory backed by a file. More...
Public Member Functions | |
MappedFileBuffer (int fd, size_t length, off_t offset) | |
~MappedFileBuffer () | |
void * | getBuffer () const |
uint64_t | getLength () const |
Private Attributes | |
void * | _buffer |
size_t | _length |
MappedFileBuffer is a wrapper around a region of host memory backed by a file.
The constructor attempts to map a file from host memory, and the destructor attempts to unmap it. If there is a problem with the host mapping/unmapping, then we panic.
VMA::MappedFileBuffer::MappedFileBuffer | ( | int | fd, |
size_t | length, | ||
off_t | offset | ||
) |
VMA::MappedFileBuffer::~MappedFileBuffer | ( | ) |
|
inline |
|
inline |
|
private |
Definition at line 193 of file vma.hh.
Referenced by getBuffer(), MappedFileBuffer(), and ~MappedFileBuffer().
|
private |
Definition at line 194 of file vma.hh.
Referenced by getLength(), MappedFileBuffer(), and ~MappedFileBuffer().