Implement memory profiler, optimize memory usage, modify code indent (#35)

This commit is contained in:
wenyongh
2019-05-23 05:03:31 -05:00
committed by GitHub
parent 9136abfe31
commit ff7cbdd2fb
18 changed files with 462 additions and 105 deletions

View File

@ -219,6 +219,15 @@ typedef struct WASMDataSeg {
uint8 *data;
} WASMDataSeg;
typedef struct BlockAddr {
const uint8 *start_addr;
uint8 *else_addr;
uint8 *end_addr;
} BlockAddr;
#define BLOCK_ADDR_CACHE_SIZE 64
#define BLOCK_ADDR_CONFLICT_SIZE 4
typedef struct WASMModule {
uint32 type_count;
uint32 import_count;
@ -252,7 +261,11 @@ typedef struct WASMModule {
uint32 start_function;
HashMap *const_str_set;
#if WASM_ENABLE_HASH_BLOCK_ADDR != 0
HashMap *branch_set;
#else
BlockAddr block_addr_cache[BLOCK_ADDR_CACHE_SIZE][BLOCK_ADDR_CONFLICT_SIZE];
#endif
} WASMModule;
typedef struct WASMBranchBlock {