class MemoryRange
Defined at line 28 of file ../../src/zircon/bin/hwstress/memory_range.h
A MemoryRange tracks a (potentially large) range of memory mapped into the address space.
Public Methods
void ~MemoryRange ()
Defined at line 64 of file ../../src/zircon/bin/hwstress/memory_range.cc
zx::result<std::unique_ptr<MemoryRange>> Create (uint64_t size, CacheMode mode)
Create and map a memory range of the given size.
Size must be aligned to zx_system_get_page_size().
Defined at line 17 of file ../../src/zircon/bin/hwstress/memory_range.cc
CacheMode cache ()
Get the cache mode of the memory.
Defined at line 41 of file ../../src/zircon/bin/hwstress/memory_range.h
cpp20::span<uint8_t> span ()
Get the memory range as a cpp20::span.
Defined at line 44 of file ../../src/zircon/bin/hwstress/memory_range.h
uint8_t * bytes ()
Get a raw pointer to the memory represented in bytes.
Defined at line 47 of file ../../src/zircon/bin/hwstress/memory_range.h
uint64_t size_bytes ()
Defined at line 48 of file ../../src/zircon/bin/hwstress/memory_range.h
void MemoryRange (zx::vmo vmo, uint8_t * addr, uint64_t size, CacheMode mode)
Create a MemoryRange from the given pre-mapped VMO.
Defined at line 48 of file ../../src/zircon/bin/hwstress/memory_range.cc
uint64_t * words ()
Get a raw pointer to the memory represented as 64-bit words.
Defined at line 51 of file ../../src/zircon/bin/hwstress/memory_range.h
uint64_t size_words ()
Defined at line 54 of file ../../src/zircon/bin/hwstress/memory_range.h
void CleanCache ()
CPU cache operations, via the kernel.
Defined at line 60 of file ../../src/zircon/bin/hwstress/memory_range.cc
const zx::vmo & vmo ()
Return the underlying vmo.
Defined at line 61 of file ../../src/zircon/bin/hwstress/memory_range.h
void CleanInvalidateCache ()
Defined at line 62 of file ../../src/zircon/bin/hwstress/memory_range.cc