Implement memory access bound check with hardware trap for 64-bit platforms (#293)
Also implement native stack overflow check with hardware trap for 64-bit platforms Refine classic interpreter and fast interpreter to improve performance Update document
This commit is contained in:
@ -42,19 +42,21 @@ os_free(void *ptr)
|
||||
}
|
||||
|
||||
void *
|
||||
os_mmap(void *hint, unsigned int size, int prot, int flags)
|
||||
os_mmap(void *hint, size_t size, int prot, int flags)
|
||||
{
|
||||
return BH_MALLOC(size);
|
||||
if ((uint64)size >= UINT32_MAX)
|
||||
return NULL;
|
||||
return BH_MALLOC((uint32)size);
|
||||
}
|
||||
|
||||
void
|
||||
os_munmap(void *addr, uint32 size)
|
||||
os_munmap(void *addr, size_t size)
|
||||
{
|
||||
return BH_FREE(addr);
|
||||
}
|
||||
|
||||
int
|
||||
os_mprotect(void *addr, uint32 size, int prot)
|
||||
os_mprotect(void *addr, size_t size, int prot)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user