add uvwasi implementation to support wasi on windows [experimental] (#534)

add uvwasi implementation to support wasi on windows [experimental] and update windows.yml

Co-authored-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Xu Jun
2021-02-22 14:17:46 +08:00
committed by GitHub
parent 370cc83fbd
commit fc50404115
13 changed files with 1394 additions and 16 deletions

View File

@ -472,6 +472,11 @@ gc_alloc_vo_internal(void *vheap, gc_size_t size,
if (!hmu)
goto finish;
bh_assert(hmu_get_size(hmu) >= tot_size);
/* the total size allocated may be larger than
the required size, reset it here */
tot_size = hmu_get_size(hmu);
g_total_malloc += tot_size;
hmu_set_ut(hmu, HMU_VO);
@ -570,6 +575,9 @@ gc_realloc_vo_internal(void *vheap, void *ptr, gc_size_t size,
if (!hmu)
goto finish;
bh_assert(hmu_get_size(hmu) >= tot_size);
/* the total size allocated may be larger than
the required size, reset it here */
g_total_malloc += tot_size;
hmu_set_ut(hmu, HMU_VO);

View File

@ -29,7 +29,13 @@ typedef struct hmu_struct {
#if BH_ENABLE_GC_VERIFY != 0
#if UINTPTR_MAX > UINT32_MAX
/* 2 prefix paddings for 64-bit pointer */
#define GC_OBJECT_PREFIX_PADDING_CNT 2
#else
/* 3 prefix paddings for 32-bit pointer */
#define GC_OBJECT_PREFIX_PADDING_CNT 3
#endif
#define GC_OBJECT_SUFFIX_PADDING_CNT 4
#define GC_OBJECT_PADDING_VALUE (0x12345678)