On Aug 21, 2:10am, Wes Peters wrote:
} Subject: mmap mapped segment length
} I discovered to my dismay today that the length field in the mmap call is
} a size_t, not an off_t. I was attempting to process a large (~50 MByte) file
} and found I was only processing the first 4 MBytes of it.
50 MB should comfortably fit in a size_t.
} Is this intentional, or just an artifact of the implementation? Is there any
} reason NOT to change this to an off_t?
The type of size_t is supposed to be large enough to express the length of
any object that will fit in the virtual address space of a process. Since
a size_t is 32 bits on an i386 and pointers are also 32 bits, there wouldn't
be any advantage to changing mmap() to use a 64 bit wide length parameter,
since you wouldn't be able to access all of such a large object.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message