libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
introvirt::inject::GuestAllocation< _Tp > Class Template Reference

#include <GuestAllocation.hh>

Collaboration diagram for introvirt::inject::GuestAllocation< _Tp >:

Public Member Functions

uint64_t address () const
 Get the underlying address.
 
 operator const guest_ptr< _Tp > & () const
 Transparently decay into a guest_ptr<_Tp>
 
 operator guest_ptr< void > () const
 Transparently decay into a guest_ptr<void>
 
const guest_ptr< _Tp > & ptr () const
 Get a copy of the underlying pointer.
 
guest_ptr< _Tp > release ()
 Release this memory from management.
 
template<typename Tp = _Tp, typename std::enable_if_t< std::is_array_v< Tp > > * dummy = nullptr>
 GuestAllocation (size_t length)
 GuestAllocation array constructor.
 
template<typename... _Args, typename Tp = _Tp, typename std::enable_if_t<!std::is_array_v< Tp > > * dummy = nullptr>
 GuestAllocation (_Args &&... __args)
 
 ~GuestAllocation ()
 
 GuestAllocation (const GuestAllocation &)=delete
 
GuestAllocationoperator= (const GuestAllocation &)=delete
 
 GuestAllocation (GuestAllocation &&src) noexcept
 
GuestAllocationoperator= (GuestAllocation &&src) noexcept
 

Static Protected Member Functions

static constexpr bool _is_array ()
 

Protected Attributes

Guestguest_
 
guest_ptr< _Tp > ptr_
 
size_t region_size_
 

Constructor & Destructor Documentation

◆ GuestAllocation() [1/4]

template<typename _Tp >
template<typename Tp = _Tp, typename std::enable_if_t< std::is_array_v< Tp > > * dummy = nullptr>
introvirt::inject::GuestAllocation< _Tp >::GuestAllocation ( size_t  length)
inlineexplicit

GuestAllocation array constructor.

Parameters
lengthThe number of elements in the array

◆ GuestAllocation() [2/4]

template<typename _Tp >
template<typename... _Args, typename Tp = _Tp, typename std::enable_if_t<!std::is_array_v< Tp > > * dummy = nullptr>
introvirt::inject::GuestAllocation< _Tp >::GuestAllocation ( _Args &&...  __args)
inlineexplicit

◆ ~GuestAllocation()

template<typename _Tp >
introvirt::inject::GuestAllocation< _Tp >::~GuestAllocation ( )
inline

◆ GuestAllocation() [3/4]

template<typename _Tp >
introvirt::inject::GuestAllocation< _Tp >::GuestAllocation ( const GuestAllocation< _Tp > &  )
delete

◆ GuestAllocation() [4/4]

template<typename _Tp >
introvirt::inject::GuestAllocation< _Tp >::GuestAllocation ( GuestAllocation< _Tp > &&  src)
inlinenoexcept

Member Function Documentation

◆ _is_array()

template<typename _Tp >
static constexpr bool introvirt::inject::GuestAllocation< _Tp >::_is_array ( )
inlinestaticconstexprprotected

◆ address()

template<typename _Tp >
uint64_t introvirt::inject::GuestAllocation< _Tp >::address ( ) const
inline

Get the underlying address.

◆ operator const guest_ptr< _Tp > &()

template<typename _Tp >
introvirt::inject::GuestAllocation< _Tp >::operator const guest_ptr< _Tp > & ( ) const
inline

Transparently decay into a guest_ptr<_Tp>

◆ operator guest_ptr< void >()

template<typename _Tp >
introvirt::inject::GuestAllocation< _Tp >::operator guest_ptr< void > ( ) const
inline

Transparently decay into a guest_ptr<void>

◆ operator=() [1/2]

template<typename _Tp >
GuestAllocation & introvirt::inject::GuestAllocation< _Tp >::operator= ( const GuestAllocation< _Tp > &  )
delete

◆ operator=() [2/2]

template<typename _Tp >
GuestAllocation & introvirt::inject::GuestAllocation< _Tp >::operator= ( GuestAllocation< _Tp > &&  src)
inlinenoexcept

◆ ptr()

template<typename _Tp >
const guest_ptr< _Tp > & introvirt::inject::GuestAllocation< _Tp >::ptr ( ) const
inline

Get a copy of the underlying pointer.

Returns
guest_ptr<_Tp>

◆ release()

template<typename _Tp >
guest_ptr< _Tp > introvirt::inject::GuestAllocation< _Tp >::release ( )
inline

Release this memory from management.

This can be used to keep memory in the guest permanently. You are essentially causing a memory leak in the guest process by calling this, so be careful.

Returns
guest_ptr<_Tp> containing the mapping

Member Data Documentation

◆ guest_

template<typename _Tp >
Guest* introvirt::inject::GuestAllocation< _Tp >::guest_
protected

◆ ptr_

template<typename _Tp >
guest_ptr<_Tp> introvirt::inject::GuestAllocation< _Tp >::ptr_
protected

◆ region_size_

template<typename _Tp >
size_t introvirt::inject::GuestAllocation< _Tp >::region_size_
protected

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