SimEng
SimEng copied to clipboard
Implicit conversion from `uint64_t` to `int64_t` caused by return value of `MemRegion::mmapRegion`
The mmapRegion function calls the addVma function which returns the address of the newly allocated virtual memory area. The return value of addVma is uint64_t; whereas the return value of mmapRegion is int64_t
The return value is mmapRegion is int64_t because on error the mmap syscall returns the value MAP_FAILED ((void *) -1), and errno is set to indicate the error.