--- /dev/null
+//===---- OrcRTBridge.h -- Utils for interacting with orc-rt ----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Declares types and symbol names provided by the ORC runtime.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_ORCRTBRIDGE_H
+#define LLVM_EXECUTIONENGINE_ORC_SHARED_ORCRTBRIDGE_H
+
+#include "llvm/ADT/StringMap.h"
+#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
+#include "llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h"
+
+namespace llvm {
+namespace orc {
+namespace rt {
+
+extern const char *MemoryReserveWrapperName;
+extern const char *MemoryFinalizeWrapperName;
+extern const char *MemoryDeallocateWrapperName;
+extern const char *MemoryWriteUInt8sWrapperName;
+extern const char *MemoryWriteUInt16sWrapperName;
+extern const char *MemoryWriteUInt32sWrapperName;
+extern const char *MemoryWriteUInt64sWrapperName;
+extern const char *MemoryWriteBuffersWrapperName;
+extern const char *RunAsMainWrapperName;
+
+using SPSMemoryReserveSignature =
+ shared::SPSExpected<shared::SPSExecutorAddress>(uint64_t);
+using SPSMemoryFinalizeSignature = shared::SPSError(shared::SPSFinalizeRequest);
+using SPSMemoryDeallocateSignature =
+ shared::SPSError(shared::SPSExecutorAddress, uint64_t);
+using SPSRunAsMainSignature = int64_t(shared::SPSExecutorAddress,
+ shared::SPSSequence<shared::SPSString>);
+
+} // end namespace rt
+} // end namespace orc
+} // end namespace llvm
+
+#endif // LLVM_EXECUTIONENGINE_ORC_SHARED_ORCRTBRIDGE_H
}
};
-using SPSRunAsMainSignature = int64_t(SPSExecutorAddress,
- SPSSequence<SPSString>);
-
using SPSLoadDylibSignature =
SPSExpected<SPSExecutorAddress>(SPSExecutorAddress, SPSString, uint64_t);
}
};
-using SPSOrcTargetProcessAllocate = SPSExpected<SPSExecutorAddress>(uint64_t);
-using SPSOrcTargetProcessFinalize = SPSError(SPSFinalizeRequest);
-using SPSOrcTargetProcessDeallocate = SPSError(SPSExecutorAddress, uint64_t);
} // end namespace shared
} // end namespace orc
#include "llvm/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.h"
#include "llvm/ExecutionEngine/Orc/LookupAndRecordAddrs.h"
+#include "llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h"
#include <limits>
{WorkingMem, static_cast<size_t>(KV.second.ContentSize)}});
WorkingMem += KV.second.ContentSize;
}
- Parent.EPC.callSPSWrapperAsync<shared::SPSOrcTargetProcessFinalize>(
+ Parent.EPC.callSPSWrapperAsync<rt::SPSMemoryFinalizeSignature>(
[OnFinalize = std::move(OnFinalize)](Error SerializationErr,
Error FinalizeErr) {
if (SerializationErr)
Error deallocate() override {
Error Err = Error::success();
- if (auto E2 =
- Parent.EPC.callSPSWrapper<shared::SPSOrcTargetProcessDeallocate>(
- Parent.FAs.Deallocate.getValue(), Err, TargetAddr, TargetSize))
+ if (auto E2 = Parent.EPC.callSPSWrapper<rt::SPSMemoryDeallocateSignature>(
+ Parent.FAs.Deallocate.getValue(), Err, TargetAddr, TargetSize))
return E2;
return Err;
}
if (WorkingSize > 0)
WorkingBuffer = std::make_unique<char[]>(WorkingSize);
Expected<ExecutorAddress> TargetAllocAddr((ExecutorAddress()));
- if (auto Err = EPC.callSPSWrapper<shared::SPSOrcTargetProcessAllocate>(
+ if (auto Err = EPC.callSPSWrapper<rt::SPSMemoryReserveSignature>(
FAs.Reserve.getValue(), TargetAllocAddr, AllocSize))
return std::move(Err);
if (!TargetAllocAddr)
add_llvm_component_library(LLVMOrcShared
OrcError.cpp
+ OrcRTBridge.cpp
RPCError.cpp
SimpleRemoteEPCUtils.cpp
ADDITIONAL_HEADER_DIRS
--- /dev/null
+//===------ OrcRTBridge.cpp - Executor functions for bootstrap -----===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h"
+
+namespace llvm {
+namespace orc {
+namespace rt {
+
+const char *MemoryReserveWrapperName =
+ "__llvm_orc_bootstrap_mem_reserve_wrapper";
+const char *MemoryFinalizeWrapperName =
+ "__llvm_orc_bootstrap_mem_finalize_wrapper";
+const char *MemoryDeallocateWrapperName =
+ "__llvm_orc_bootstrap_mem_deallocate_wrapper";
+const char *MemoryWriteUInt8sWrapperName =
+ "__llvm_orc_bootstrap_mem_write_uint8s_wrapper";
+const char *MemoryWriteUInt16sWrapperName =
+ "__llvm_orc_bootstrap_mem_write_uint16s_wrapper";
+const char *MemoryWriteUInt32sWrapperName =
+ "__llvm_orc_bootstrap_mem_write_uint32s_wrapper";
+const char *MemoryWriteUInt64sWrapperName =
+ "__llvm_orc_bootstrap_mem_write_uint64s_wrapper";
+const char *MemoryWriteBuffersWrapperName =
+ "__llvm_orc_bootstrap_mem_write_buffers_wrapper";
+const char *RunAsMainWrapperName = "__llvm_orc_bootstrap_run_as_main_wrapper";
+
+} // end namespace rt
+} // end namespace orc
+} // end namespace llvm
#include "llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h"
#include "llvm/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.h"
#include "llvm/ExecutionEngine/Orc/EPCGenericMemoryAccess.h"
+#include "llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h"
#include "llvm/Support/FormatVariadic.h"
#define DEBUG_TYPE "orc"
Expected<int32_t> SimpleRemoteEPC::runAsMain(JITTargetAddress MainFnAddr,
ArrayRef<std::string> Args) {
int64_t Result = 0;
- if (auto Err = callSPSWrapper<shared::SPSRunAsMainSignature>(
+ if (auto Err = callSPSWrapper<rt::SPSRunAsMainSignature>(
RunAsMainAddr.getValue(), Result, ExecutorAddress(MainFnAddr), Args))
return std::move(Err);
return Result;
SimpleRemoteEPC::createMemoryManager() {
EPCGenericJITLinkMemoryManager::FuncAddrs FAs;
if (auto Err = getBootstrapSymbols(
- {{FAs.Reserve, "__llvm_orc_memory_reserve"},
- {FAs.Finalize, "__llvm_orc_memory_finalize"},
- {FAs.Deallocate, "__llvm_orc_memory_deallocate"}}))
+ {{FAs.Reserve, rt::MemoryReserveWrapperName},
+ {FAs.Finalize, rt::MemoryFinalizeWrapperName},
+ {FAs.Deallocate, rt::MemoryDeallocateWrapperName}}))
return std::move(Err);
return std::make_unique<EPCGenericJITLinkMemoryManager>(*this, FAs);
{JDI.JITDispatchFunctionAddress, DispatchFnName},
{LoadDylibAddr, "__llvm_orc_load_dylib"},
{LookupSymbolsAddr, "__llvm_orc_lookup_symbols"},
- {RunAsMainAddr, "__llvm_orc_run_as_main"}}))
+ {RunAsMainAddr, rt::RunAsMainWrapperName}}))
return Err;
if (auto MemMgr = createMemoryManager()) {
add_llvm_component_library(LLVMOrcTargetProcess
JITLoaderGDB.cpp
+ OrcRTBootstrap.cpp
RegisterEHFrames.cpp
SimpleRemoteEPCServer.cpp
TargetExecutionUtils.cpp
--- /dev/null
+//===------------------------ OrcRTBootstrap.cpp --------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "OrcRTBootstrap.h"
+
+#include "llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h"
+#include "llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h"
+#include "llvm/ExecutionEngine/Orc/TargetProcess/TargetExecutionUtils.h"
+
+#define DEBUG_TYPE "orc"
+
+using namespace llvm::orc::shared;
+
+namespace llvm {
+namespace orc {
+namespace rt_bootstrap {
+
+static llvm::orc::shared::detail::CWrapperFunctionResult
+reserveWrapper(const char *ArgData, size_t ArgSize) {
+ return WrapperFunction<rt::SPSMemoryReserveSignature>::handle(
+ ArgData, ArgSize,
+ [](uint64_t Size) -> Expected<ExecutorAddress> {
+ std::error_code EC;
+ auto MB = sys::Memory::allocateMappedMemory(
+ Size, 0, sys::Memory::MF_READ | sys::Memory::MF_WRITE, EC);
+ if (EC)
+ return errorCodeToError(EC);
+ return ExecutorAddress::fromPtr(MB.base());
+ })
+ .release();
+}
+
+static llvm::orc::shared::detail::CWrapperFunctionResult
+finalizeWrapper(const char *ArgData, size_t ArgSize) {
+ return WrapperFunction<rt::SPSMemoryFinalizeSignature>::handle(
+ ArgData, ArgSize,
+ [](const tpctypes::FinalizeRequest &FR) -> Error {
+ for (auto &Seg : FR) {
+ char *Mem = Seg.Addr.toPtr<char *>();
+ memcpy(Mem, Seg.Content.data(), Seg.Content.size());
+ memset(Mem + Seg.Content.size(), 0,
+ Seg.Size - Seg.Content.size());
+ assert(Seg.Size <= std::numeric_limits<size_t>::max());
+ if (auto EC = sys::Memory::protectMappedMemory(
+ {Mem, static_cast<size_t>(Seg.Size)},
+ tpctypes::fromWireProtectionFlags(Seg.Prot)))
+ return errorCodeToError(EC);
+ if (Seg.Prot & tpctypes::WPF_Exec)
+ sys::Memory::InvalidateInstructionCache(Mem, Seg.Size);
+ }
+ return Error::success();
+ })
+ .release();
+}
+
+static llvm::orc::shared::detail::CWrapperFunctionResult
+deallocateWrapper(const char *ArgData, size_t ArgSize) {
+ return WrapperFunction<rt::SPSMemoryDeallocateSignature>::handle(
+ ArgData, ArgSize,
+ [](ExecutorAddress Base, uint64_t Size) -> Error {
+ sys::MemoryBlock MB(Base.toPtr<void *>(), Size);
+ if (auto EC = sys::Memory::releaseMappedMemory(MB))
+ return errorCodeToError(EC);
+ return Error::success();
+ })
+ .release();
+}
+
+template <typename WriteT, typename SPSWriteT>
+static llvm::orc::shared::detail::CWrapperFunctionResult
+writeUIntsWrapper(const char *ArgData, size_t ArgSize) {
+ return WrapperFunction<void(SPSSequence<SPSWriteT>)>::handle(
+ ArgData, ArgSize,
+ [](std::vector<WriteT> Ws) {
+ for (auto &W : Ws)
+ *jitTargetAddressToPointer<decltype(W.Value) *>(W.Address) =
+ W.Value;
+ })
+ .release();
+}
+
+static llvm::orc::shared::detail::CWrapperFunctionResult
+writeBuffersWrapper(const char *ArgData, size_t ArgSize) {
+ return WrapperFunction<void(SPSSequence<SPSMemoryAccessBufferWrite>)>::handle(
+ ArgData, ArgSize,
+ [](std::vector<tpctypes::BufferWrite> Ws) {
+ for (auto &W : Ws)
+ memcpy(jitTargetAddressToPointer<char *>(W.Address),
+ W.Buffer.data(), W.Buffer.size());
+ })
+ .release();
+}
+
+static llvm::orc::shared::detail::CWrapperFunctionResult
+runAsMainWrapper(const char *ArgData, size_t ArgSize) {
+ return WrapperFunction<rt::SPSRunAsMainSignature>::handle(
+ ArgData, ArgSize,
+ [](ExecutorAddress MainAddr,
+ std::vector<std::string> Args) -> int64_t {
+ return runAsMain(MainAddr.toPtr<int (*)(int, char *[])>(), Args);
+ })
+ .release();
+}
+
+void addTo(StringMap<ExecutorAddress> &M) {
+ M[rt::MemoryReserveWrapperName] = ExecutorAddress::fromPtr(&reserveWrapper);
+ M[rt::MemoryFinalizeWrapperName] = ExecutorAddress::fromPtr(&finalizeWrapper);
+ M[rt::MemoryDeallocateWrapperName] =
+ ExecutorAddress::fromPtr(&deallocateWrapper);
+ M[rt::MemoryWriteUInt8sWrapperName] = ExecutorAddress::fromPtr(
+ &writeUIntsWrapper<tpctypes::UInt8Write,
+ shared::SPSMemoryAccessUInt8Write>);
+ M[rt::MemoryWriteUInt16sWrapperName] = ExecutorAddress::fromPtr(
+ &writeUIntsWrapper<tpctypes::UInt16Write,
+ shared::SPSMemoryAccessUInt16Write>);
+ M[rt::MemoryWriteUInt32sWrapperName] = ExecutorAddress::fromPtr(
+ &writeUIntsWrapper<tpctypes::UInt32Write,
+ shared::SPSMemoryAccessUInt32Write>);
+ M[rt::MemoryWriteUInt64sWrapperName] = ExecutorAddress::fromPtr(
+ &writeUIntsWrapper<tpctypes::UInt64Write,
+ shared::SPSMemoryAccessUInt64Write>);
+ M[rt::MemoryWriteBuffersWrapperName] =
+ ExecutorAddress::fromPtr(&writeBuffersWrapper);
+ M[rt::RunAsMainWrapperName] = ExecutorAddress::fromPtr(&runAsMainWrapper);
+}
+
+} // end namespace rt_bootstrap
+} // end namespace orc
+} // end namespace llvm
--- /dev/null
+//===----------------------- OrcRTBootstrap.h -------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// OrcRTPrelinkImpl provides functions that should be linked into the executor
+// to bootstrap common JIT functionality (e.g. memory allocation and memory
+// access).
+//
+// Call rt_impl::addTo to add these functions to a bootstrap symbols map.
+//
+// FIXME: The functionality in this file should probably be moved to an ORC
+// runtime bootstrap library in compiler-rt.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LIB_EXECUTIONENGINE_ORC_TARGETPROCESS_ORCRTBOOTSTRAP_H
+#define LIB_EXECUTIONENGINE_ORC_TARGETPROCESS_ORCRTBOOTSTRAP_H
+
+#include "llvm/ADT/StringMap.h"
+#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
+
+namespace llvm {
+namespace orc {
+namespace rt_bootstrap {
+
+void addTo(StringMap<ExecutorAddress> &M);
+
+} // namespace rt_bootstrap
+} // end namespace orc
+} // end namespace llvm
+
+#endif // LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_ORCRTBOOTSTRAP_H
#include "llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h"
#include "llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h"
-#include "llvm/ExecutionEngine/Orc/TargetProcess/TargetExecutionUtils.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/Process.h"
+#include "OrcRTBootstrap.h"
+
#define DEBUG_TYPE "orc"
using namespace llvm::orc::shared;
namespace llvm {
namespace orc {
-static llvm::orc::shared::detail::CWrapperFunctionResult
-reserveWrapper(const char *ArgData, size_t ArgSize) {
- return WrapperFunction<SPSOrcTargetProcessAllocate>::handle(
- ArgData, ArgSize,
- [](uint64_t Size) -> Expected<ExecutorAddress> {
- std::error_code EC;
- auto MB = sys::Memory::allocateMappedMemory(
- Size, 0, sys::Memory::MF_READ | sys::Memory::MF_WRITE, EC);
- if (EC)
- return errorCodeToError(EC);
- return ExecutorAddress::fromPtr(MB.base());
- })
- .release();
-}
-
-static llvm::orc::shared::detail::CWrapperFunctionResult
-finalizeWrapper(const char *ArgData, size_t ArgSize) {
- return WrapperFunction<SPSOrcTargetProcessFinalize>::handle(
- ArgData, ArgSize,
- [](const tpctypes::FinalizeRequest &FR) -> Error {
- for (auto &Seg : FR) {
- char *Mem = Seg.Addr.toPtr<char *>();
- memcpy(Mem, Seg.Content.data(), Seg.Content.size());
- memset(Mem + Seg.Content.size(), 0,
- Seg.Size - Seg.Content.size());
- assert(Seg.Size <= std::numeric_limits<size_t>::max());
- if (auto EC = sys::Memory::protectMappedMemory(
- {Mem, static_cast<size_t>(Seg.Size)},
- tpctypes::fromWireProtectionFlags(Seg.Prot)))
- return errorCodeToError(EC);
- if (Seg.Prot & tpctypes::WPF_Exec)
- sys::Memory::InvalidateInstructionCache(Mem, Seg.Size);
- }
- return Error::success();
- })
- .release();
-}
-
-static llvm::orc::shared::detail::CWrapperFunctionResult
-deallocateWrapper(const char *ArgData, size_t ArgSize) {
- return WrapperFunction<SPSOrcTargetProcessDeallocate>::handle(
- ArgData, ArgSize,
- [](ExecutorAddress Base, uint64_t Size) -> Error {
- sys::MemoryBlock MB(Base.toPtr<void *>(), Size);
- if (auto EC = sys::Memory::releaseMappedMemory(MB))
- return errorCodeToError(EC);
- return Error::success();
- })
- .release();
-}
-
-template <typename WriteT, typename SPSWriteT>
-static llvm::orc::shared::detail::CWrapperFunctionResult
-writeUIntsWrapper(const char *ArgData, size_t ArgSize) {
- return WrapperFunction<void(SPSSequence<SPSWriteT>)>::handle(
- ArgData, ArgSize,
- [](std::vector<WriteT> Ws) {
- for (auto &W : Ws)
- *jitTargetAddressToPointer<decltype(W.Value) *>(W.Address) =
- W.Value;
- })
- .release();
-}
-
-static llvm::orc::shared::detail::CWrapperFunctionResult
-writeBuffersWrapper(const char *ArgData, size_t ArgSize) {
- return WrapperFunction<void(SPSSequence<SPSMemoryAccessBufferWrite>)>::handle(
- ArgData, ArgSize,
- [](std::vector<tpctypes::BufferWrite> Ws) {
- for (auto &W : Ws)
- memcpy(jitTargetAddressToPointer<char *>(W.Address),
- W.Buffer.data(), W.Buffer.size());
- })
- .release();
-}
-
-static llvm::orc::shared::detail::CWrapperFunctionResult
-runAsMainWrapper(const char *ArgData, size_t ArgSize) {
- return WrapperFunction<SPSRunAsMainSignature>::handle(
- ArgData, ArgSize,
- [](ExecutorAddress MainAddr,
- std::vector<std::string> Args) -> int64_t {
- return runAsMain(MainAddr.toPtr<int (*)(int, char *[])>(), Args);
- })
- .release();
-}
-
SimpleRemoteEPCServer::Dispatcher::~Dispatcher() {}
#if LLVM_ENABLE_THREADS
StringMap<ExecutorAddress> SimpleRemoteEPCServer::defaultBootstrapSymbols() {
StringMap<ExecutorAddress> DBS;
-
- DBS["__llvm_orc_memory_reserve"] = ExecutorAddress::fromPtr(&reserveWrapper);
- DBS["__llvm_orc_memory_finalize"] =
- ExecutorAddress::fromPtr(&finalizeWrapper);
- DBS["__llvm_orc_memory_deallocate"] =
- ExecutorAddress::fromPtr(&deallocateWrapper);
- DBS["__llvm_orc_memory_write_uint8s"] = ExecutorAddress::fromPtr(
- &writeUIntsWrapper<tpctypes::UInt8Write,
- shared::SPSMemoryAccessUInt8Write>);
- DBS["__llvm_orc_memory_write_uint16s"] = ExecutorAddress::fromPtr(
- &writeUIntsWrapper<tpctypes::UInt16Write,
- shared::SPSMemoryAccessUInt16Write>);
- DBS["__llvm_orc_memory_write_uint32s"] = ExecutorAddress::fromPtr(
- &writeUIntsWrapper<tpctypes::UInt32Write,
- shared::SPSMemoryAccessUInt32Write>);
- DBS["__llvm_orc_memory_write_uint64s"] = ExecutorAddress::fromPtr(
- &writeUIntsWrapper<tpctypes::UInt64Write,
- shared::SPSMemoryAccessUInt64Write>);
- DBS["__llvm_orc_memory_write_buffers"] =
- ExecutorAddress::fromPtr(&writeBuffersWrapper);
- DBS["__llvm_orc_run_as_main"] = ExecutorAddress::fromPtr(&runAsMainWrapper);
+ rt_bootstrap::addTo(DBS);
DBS["__llvm_orc_load_dylib"] = ExecutorAddress::fromPtr(&loadDylibWrapper);
DBS["__llvm_orc_lookup_symbols"] =
ExecutorAddress::fromPtr(&lookupSymbolsWrapper);
#include "OrcTestCommon.h"
#include "llvm/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.h"
+#include "llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h"
#include "llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h"
#include "llvm/Support/Memory.h"
#include "llvm/Testing/Support/Error.h"
llvm::orc::shared::detail::CWrapperFunctionResult
testReserve(const char *ArgData, size_t ArgSize) {
- return WrapperFunction<SPSOrcTargetProcessAllocate>::handle(
+ return WrapperFunction<rt::SPSMemoryReserveSignature>::handle(
ArgData, ArgSize,
[](uint64_t Size) -> Expected<ExecutorAddress> {
std::error_code EC;
llvm::orc::shared::detail::CWrapperFunctionResult
testFinalize(const char *ArgData, size_t ArgSize) {
- return WrapperFunction<SPSOrcTargetProcessFinalize>::handle(
+ return WrapperFunction<rt::SPSMemoryFinalizeSignature>::handle(
ArgData, ArgSize,
[](const tpctypes::FinalizeRequest &FR) -> Error {
for (auto &Seg : FR) {
llvm::orc::shared::detail::CWrapperFunctionResult
testDeallocate(const char *ArgData, size_t ArgSize) {
- return WrapperFunction<SPSOrcTargetProcessDeallocate>::handle(
+ return WrapperFunction<rt::SPSMemoryDeallocateSignature>::handle(
ArgData, ArgSize,
[](ExecutorAddress Base, uint64_t Size) -> Error {
sys::MemoryBlock MB(Base.toPtr<void *>(), Size);