Wasmtime
sharedmemory.h
Go to the documentation of this file.
1
7#ifndef WASMTIME_SHAREDMEMORY_H
8#define WASMTIME_SHAREDMEMORY_H
9
10#include <wasm.h>
11#include <wasmtime/error.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
23typedef struct wasmtime_sharedmemory wasmtime_sharedmemory_t;
24
35WASM_API_EXTERN wasmtime_error_t *
37 const wasm_memorytype_t *ty,
39
45WASM_API_EXTERN void
47
56WASM_API_EXTERN wasmtime_sharedmemory_t *
58
62WASM_API_EXTERN wasm_memorytype_t *
64
69WASM_API_EXTERN uint8_t *
71
75WASM_API_EXTERN size_t
77
81WASM_API_EXTERN uint64_t
83
95WASM_API_EXTERN wasmtime_error_t *
97 uint64_t delta, uint64_t *prev_size);
98
99#ifdef __cplusplus
100} // extern "C"
101#endif
102
103#endif // WASMTIME_SHAREDMEMORY_H
Definition and accessors of wasmtime_error_t.
void wasmtime_sharedmemory_delete(wasmtime_sharedmemory_t *memory)
Deletes shared linear memory.
uint64_t wasmtime_sharedmemory_size(const wasmtime_sharedmemory_t *memory)
Returns the length, in WebAssembly pages, of this shared linear memory.
struct wasmtime_sharedmemory wasmtime_sharedmemory_t
Interface for shared memories.
Definition: sharedmemory.h:23
wasm_memorytype_t * wasmtime_sharedmemory_type(const wasmtime_sharedmemory_t *memory)
Returns the type of the shared memory specified.
uint8_t * wasmtime_sharedmemory_data(const wasmtime_sharedmemory_t *memory)
Returns the base pointer in memory where the shared linear memory starts.
wasmtime_error_t * wasmtime_sharedmemory_new(const wasm_engine_t *engine, const wasm_memorytype_t *ty, wasmtime_sharedmemory_t **ret)
Creates a new WebAssembly shared linear memory.
wasmtime_sharedmemory_t * wasmtime_sharedmemory_clone(const wasmtime_sharedmemory_t *memory)
Clones shared linear memory.
size_t wasmtime_sharedmemory_data_size(const wasmtime_sharedmemory_t *memory)
Returns the byte length of this shared linear memory.
wasmtime_error_t * wasmtime_sharedmemory_grow(const wasmtime_sharedmemory_t *memory, uint64_t delta, uint64_t *prev_size)
Attempts to grow the specified shared memory by delta pages.
Compilation environment and configuration.
An opaque object representing the type of a memory.
Errors generated by Wasmtime.