Implement shared heap for AOT (#3815)

This commit is contained in:
Wenyong Huang
2024-09-29 12:50:59 +08:00
committed by GitHub
parent c4aa1deda5
commit 9ba36e284c
29 changed files with 684 additions and 81 deletions

View File

@ -6,17 +6,17 @@
#include <stdio.h>
extern void *
shared_malloc(int size);
shared_heap_malloc(int size);
extern void
shared_free(void *offset);
shared_heap_free(void *offset);
int
test()
{
int *ptr = (int *)shared_malloc(10);
int *ptr = (int *)shared_heap_malloc(10);
*ptr = 10;
int a = *ptr;
shared_free(ptr);
shared_heap_free(ptr);
return a;
}
}