Kagome
Polkadot Runtime Engine in C++17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
wavm_internal_memory_provider.hpp
Go to the documentation of this file.
1
6
#ifndef KAGOME_CORE_RUNTIME_WAVM_IMPL_WAVM_INTERNAL_MEMORY_PROVIDER_HPP
7
#define KAGOME_CORE_RUNTIME_WAVM_IMPL_WAVM_INTERNAL_MEMORY_PROVIDER_HPP
8
9
#include "
runtime/memory_provider.hpp
"
10
11
namespace
WAVM::Runtime
{
12
struct
Memory;
13
}
14
15
namespace
kagome::runtime::wavm
{
16
class
MemoryImpl;
17
18
class
WavmInternalMemoryProvider
final :
public
MemoryProvider
{
19
public
:
20
explicit
WavmInternalMemoryProvider
(WAVM::Runtime::Memory *memory);
21
22
std::optional<std::reference_wrapper<runtime::Memory>> getCurrentMemory()
23
const override
;
24
outcome::result<void> resetMemory(
WasmSize
heap_base)
override
;
25
26
private
:
27
WAVM::Runtime::Memory *
memory_
;
28
std::shared_ptr<Memory>
current_memory_
;
29
};
30
31
}
// namespace kagome::runtime::wavm
32
33
#endif // KAGOME_CORE_RUNTIME_WAVM_IMPL_WAVM_MEMORY_PROVIDER_HPP
kagome::runtime::WasmSize
uint32_t WasmSize
Size type is uint32_t because we are working in 32 bit address space.
Definition:
types.hpp:35
kagome::runtime::wavm::WavmInternalMemoryProvider
Definition:
wavm_internal_memory_provider.hpp:18
WAVM::Runtime
Definition:
compartment_wrapper.hpp:12
kagome::runtime::wavm
Definition:
compartment_wrapper.cpp:12
kagome::runtime::MemoryProvider
Definition:
memory_provider.hpp:17
kagome::runtime::wavm::WavmInternalMemoryProvider::memory_
WAVM::Runtime::Memory * memory_
Definition:
wavm_internal_memory_provider.hpp:27
kagome::runtime::wavm::WavmInternalMemoryProvider::current_memory_
std::shared_ptr< Memory > current_memory_
Definition:
wavm_internal_memory_provider.hpp:28
memory_provider.hpp
core
runtime
wavm
wavm_internal_memory_provider.hpp
Generated by
1.8.11