mirror of
https://github.com/vimpunk/mio.git
synced 2025-12-06 16:57:01 +08:00
Fix memory mapped data offset
I think the virtual address maybe like this: ctx.data = mapping_start + offset - aligned_offset;
This commit is contained in:
parent
e101ff3e89
commit
c071714a70
@ -201,7 +201,7 @@ inline mmap_context memory_map(const file_handle_type file_handle, const int64_t
|
||||
}
|
||||
#endif
|
||||
mmap_context ctx;
|
||||
ctx.data = mapping_start + offset;
|
||||
ctx.data = mapping_start + offset - aligned_offset;
|
||||
ctx.length = length;
|
||||
ctx.mapped_length = length_to_map;
|
||||
#ifdef _WIN32
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user