/proc/../as bigger than off64_t on Solaris

view full story

http://unix.stackexchange.com – How do I read or seek from a file that's bigger than the maximum off64_t? The problem arises because the address space of a process is represented in the /proc/.../as file, which is a huge sparse file for 64-bit processes. It's really very big: on a sample process on Solaris x86-64, argv's address is 0xFFFFFD7FFFxxxxxx, that is, the very top of the address space is used. Pointers are unsigned, but an off64_t is signed, so can't reach anything in the top half of the address space file. This obviously depends on the layout of the address space. On 32-bit systems, this isn't a problem (a long of (HowTos)