gem5  v22.0.0.2
Public Member Functions | Private Attributes | List of all members
gem5::VMA::MappedFileBuffer Class Reference

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
 

Detailed Description

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.

Definition at line 186 of file vma.hh.

Constructor & Destructor Documentation

◆ MappedFileBuffer()

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.

◆ ~MappedFileBuffer()

gem5::VMA::MappedFileBuffer::~MappedFileBuffer ( )

Definition at line 150 of file vma.cc.

References panic_if.

Member Function Documentation

◆ getBuffer()

void* gem5::VMA::MappedFileBuffer::getBuffer ( ) const
inline

Definition at line 192 of file vma.hh.

References _buffer.

◆ getLength()

uint64_t gem5::VMA::MappedFileBuffer::getLength ( ) const
inline

Definition at line 193 of file vma.hh.

References _length.

Member Data Documentation

◆ _buffer

void* gem5::VMA::MappedFileBuffer::_buffer
private

Definition at line 196 of file vma.hh.

Referenced by getBuffer(), and MappedFileBuffer().

◆ _length

size_t gem5::VMA::MappedFileBuffer::_length
private

Definition at line 197 of file vma.hh.

Referenced by getLength(), and MappedFileBuffer().


The documentation for this class was generated from the following files:

Generated on Thu Jul 28 2022 13:33:18 for gem5 by doxygen 1.8.17