MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / WasmEdge_MemoryInstanceGetPointerConst

Function WasmEdge_MemoryInstanceGetPointerConst

lib/api/wasmedge.cpp:2924–2934  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2922}
2923
2924WASMEDGE_CAPI_EXPORT const uint8_t *WasmEdge_MemoryInstanceGetPointerConst(
2925 const WasmEdge_MemoryInstanceContext *Cxt, const uint64_t Offset,
2926 const uint64_t Length) noexcept {
2927 if (Cxt) {
2928 const auto S = fromMemCxt(Cxt)->getSpan<const uint8_t>(Offset, Length);
2929 if (S.size() == Length) {
2930 return S.data();
2931 }
2932 }
2933 return nullptr;
2934}
2935
2936WASMEDGE_CAPI_EXPORT uint64_t WasmEdge_MemoryInstanceGetPageSize(
2937 const WasmEdge_MemoryInstanceContext *Cxt) noexcept {

Callers 1

TESTFunction · 0.85

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by 1

TESTFunction · 0.68