I ask ideally in python, but even in C/++ if there is no solution in Python. The question is, how can I map 3 files, a.bin, b.bin, and c.bin, each at a different offset into the same memory map (each starting at a different address, without overlaps) in python? Is it possible?
Equivalently, is it possible to map a file to memory using a negative offset, meaning that instead of address 0 in mmap pointing to some arbitrary positive address in the file, I need the other way around, such that an arbitrary positive address in mmap points to the beginning of the file (address 0), which would imply accessing address 0 in mmap would correspond to a location before the start of the file, hence the term "negative", which ideally would be handled as an exception or return some filler value, such as 0xFF.