gem5
v20.1.0.0
|
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 | ||
) |
Definition at line 119 of file vma.cc.
References _buffer, _length, ArmISA::fd, ArmISA::offset, panic, and panic_if.
VMA::MappedFileBuffer::~MappedFileBuffer | ( | ) |
|
inline |
|
inline |
|
private |
Definition at line 193 of file vma.hh.
Referenced by getBuffer(), and MappedFileBuffer().
|
private |
Definition at line 194 of file vma.hh.
Referenced by getLength(), and MappedFileBuffer().