Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Static Public Member Functions | List of all members
dart::bin::VirtualMemory Class Reference

#include <virtual_memory.h>

Public Types

enum  Protection {
  kNoAccess , kReadOnly , kReadWrite , kReadExecute ,
  kReadWriteExecute
}
 

Public Member Functions

 ~VirtualMemory ()
 
void release ()
 
uword start () const
 
uword end () const
 
void * address () const
 
intptr_t size () const
 
void Protect (Protection mode)
 

Static Public Member Functions

static void Protect (void *address, intptr_t size, Protection mode)
 
static VirtualMemoryAllocate (intptr_t size, bool is_executable, const char *name)
 
static void Init ()
 
static intptr_t PageSize ()
 

Detailed Description

Definition at line 14 of file virtual_memory.h.

Member Enumeration Documentation

◆ Protection

Enumerator
kNoAccess 
kReadOnly 
kReadWrite 
kReadExecute 
kReadWriteExecute 

Definition at line 16 of file virtual_memory.h.

Constructor & Destructor Documentation

◆ ~VirtualMemory()

dart::bin::VirtualMemory::~VirtualMemory ( )

Member Function Documentation

◆ address()

void * dart::bin::VirtualMemory::address ( ) const
inline

Definition at line 34 of file virtual_memory.h.

34{ return address_; }

◆ Allocate()

static VirtualMemory * dart::bin::VirtualMemory::Allocate ( intptr_t  size,
bool  is_executable,
const char *  name 
)
static

◆ end()

uword dart::bin::VirtualMemory::end ( ) const
inline

Definition at line 33 of file virtual_memory.h.

33{ return reinterpret_cast<uword>(address_) + size_; }
uintptr_t uword
Definition: globals.h:501

◆ Init()

static void dart::bin::VirtualMemory::Init ( )
inlinestatic

Definition at line 47 of file virtual_memory.h.

47{ page_size_ = CalculatePageSize(); }

◆ PageSize()

static intptr_t dart::bin::VirtualMemory::PageSize ( )
inlinestatic

Definition at line 50 of file virtual_memory.h.

50 {
51 ASSERT(page_size_ != 0);
52 return page_size_;
53 }
#define ASSERT(E)

◆ Protect() [1/2]

void dart::bin::VirtualMemory::Protect ( Protection  mode)
inline

Definition at line 39 of file virtual_memory.h.

39{ return Protect(address(), size(), mode); }
intptr_t size() const
static void Protect(void *address, intptr_t size, Protection mode)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
Definition: switches.h:228

◆ Protect() [2/2]

static void dart::bin::VirtualMemory::Protect ( void *  address,
intptr_t  size,
Protection  mode 
)
static

◆ release()

void dart::bin::VirtualMemory::release ( )
inline

Definition at line 27 of file virtual_memory.h.

27 {
28 address_ = nullptr;
29 size_ = 0;
30 }

◆ size()

intptr_t dart::bin::VirtualMemory::size ( ) const
inline

Definition at line 35 of file virtual_memory.h.

35{ return size_; }

◆ start()

uword dart::bin::VirtualMemory::start ( ) const
inline

Definition at line 32 of file virtual_memory.h.

32{ return reinterpret_cast<uword>(address_); }

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