gem5 v24.0.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 |
off_t | getOffset () const |
Private Attributes | |
void * | _buffer |
size_t | _length |
off_t | _offset |
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.
gem5::VMA::MappedFileBuffer::MappedFileBuffer | ( | int | fd, |
size_t | length, | ||
off_t | offset ) |
Definition at line 121 of file vma.cc.
References _buffer, _length, gem5::ArmISA::fd, gem5::ArmISA::offset, panic, and panic_if.
gem5::VMA::MappedFileBuffer::~MappedFileBuffer | ( | ) |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 201 of file vma.hh.
Referenced by getBuffer(), and MappedFileBuffer().
|
private |
Definition at line 202 of file vma.hh.
Referenced by getLength(), and MappedFileBuffer().
|
private |
Definition at line 203 of file vma.hh.
Referenced by getOffset().