Skip to content

Commit 875388b

Browse files
chaoqin-li1123knm3000
authored andcommitted
Export emscripten_notify_memory_growth(). (proxy-wasm#288)
Signed-off-by: chaoqin-li1123 <[email protected]>
1 parent 2d56f86 commit 875388b

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

include/proxy-wasm/exports.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ void wasi_unstable_proc_exit(Word);
177177
Word wasi_unstable_clock_time_get(Word, uint64_t, Word);
178178
Word wasi_unstable_random_get(Word, Word);
179179
Word pthread_equal(Word left, Word right);
180+
void emscripten_notify_memory_growth(Word);
180181

181182
// Support for embedders, not exported to Wasm.
182183

src/exports.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,8 @@ void wasi_unstable_proc_exit(Word /*exit_code*/) {
908908

909909
Word pthread_equal(Word left, Word right) { return static_cast<uint64_t>(left == right); }
910910

911+
void emscripten_notify_memory_growth(Word /*memory_index*/) {}
912+
911913
Word set_tick_period_milliseconds(Word period_milliseconds) {
912914
TimerToken token = 0;
913915
return contextOrEffectiveContext()->setTimerPeriod(std::chrono::milliseconds(period_milliseconds),

src/wasm.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ void WasmBase::registerCallbacks() {
8989
&ConvertFunctionWordToUint32<decltype(exports::_fn), \
9090
exports::_fn>::convertFunctionWordToUint32)
9191
_REGISTER(pthread_equal);
92+
_REGISTER(emscripten_notify_memory_growth);
9293
#undef _REGISTER
9394

9495
// Register the capability with the VM if it has been allowed, otherwise register a stub.

0 commit comments

Comments
 (0)