Re-org memory allocation interfaces, add --stack-size and --heap-size option (#193)

This commit is contained in:
wenyongh
2020-03-10 19:54:44 +08:00
committed by GitHub
parent 381859d530
commit 0fdd49ea31
110 changed files with 1264 additions and 2125 deletions

View File

@ -67,7 +67,21 @@ bh_strdup(const char *s)
if (s) {
size = (uint32)(strlen(s) + 1);
if ((s1 = bh_malloc(size)))
if ((s1 = BH_MALLOC(size)))
bh_memcpy_s(s1, size, s, size);
}
return s1;
}
char *
wa_strdup(const char *s)
{
uint32 size;
char *s1 = NULL;
if (s) {
size = (uint32)(strlen(s) + 1);
if ((s1 = WA_MALLOC(size)))
bh_memcpy_s(s1, size, s, size);
}
return s1;