summaryrefslogtreecommitdiff
path: root/src/binaryen-c.h
diff options
context:
space:
mode:
authorJackson Gardner <eyebrowsoffire@gmail.com>2022-05-24 09:59:47 -0700
committerGitHub <noreply@github.com>2022-05-24 09:59:47 -0700
commit721e8ffb975a6e68a56287cd46ecc19e107211c6 (patch)
tree021219639b5c4b80c235cce42c79902c40fa4794 /src/binaryen-c.h
parenta78d0e44cbcc72682ab9c45dec76d4b1c52588c9 (diff)
downloadbinaryen-721e8ffb975a6e68a56287cd46ecc19e107211c6.tar.gz
binaryen-721e8ffb975a6e68a56287cd46ecc19e107211c6.tar.bz2
binaryen-721e8ffb975a6e68a56287cd46ecc19e107211c6.zip
Add C and JS API functions for accessing memory info (#4682)
Based on #3573 plus minor fixes
Diffstat (limited to 'src/binaryen-c.h')
-rw-r--r--src/binaryen-c.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/binaryen-c.h b/src/binaryen-c.h
index ed0f01f1c..715b08880 100644
--- a/src/binaryen-c.h
+++ b/src/binaryen-c.h
@@ -2285,6 +2285,15 @@ BINARYEN_API void BinaryenSetMemory(BinaryenModuleRef module,
BinaryenIndex numSegments,
bool shared);
+BINARYEN_API bool BinaryenHasMemory(BinaryenModuleRef module);
+BINARYEN_API BinaryenIndex BinaryenMemoryGetInitial(BinaryenModuleRef module);
+BINARYEN_API bool BinaryenMemoryHasMax(BinaryenModuleRef module);
+BINARYEN_API BinaryenIndex BinaryenMemoryGetMax(BinaryenModuleRef module);
+BINARYEN_API const char*
+BinaryenMemoryImportGetModule(BinaryenModuleRef module);
+BINARYEN_API const char* BinaryenMemoryImportGetBase(BinaryenModuleRef module);
+BINARYEN_API bool BinaryenMemoryIsShared(BinaryenModuleRef module);
+
// Memory segments. Query utilities.
BINARYEN_API uint32_t BinaryenGetNumMemorySegments(BinaryenModuleRef module);