Add shared heap sample (#3806)
This commit is contained in:
18
samples/shared-heap/wasm-apps/test2.c
Normal file
18
samples/shared-heap/wasm-apps/test2.c
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
extern void
|
||||
shared_free(void *ptr);
|
||||
|
||||
void
|
||||
print_buf(char *buf)
|
||||
{
|
||||
printf("wasm app2's wasm func received buf: %s\n\n", buf);
|
||||
shared_free(buf);
|
||||
}
|
||||
Reference in New Issue
Block a user