From owner-freebsd-hackers Sat Aug 21 2: 8:28 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from gatekeeper.tsc.tdk.com (gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (Postfix) with ESMTP id 44E3F1544B for ; Sat, 21 Aug 1999 02:08:23 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from sunrise.gv.tsc.tdk.com (root@sunrise.gv.tsc.tdk.com [192.168.241.191]) by gatekeeper.tsc.tdk.com (8.8.8/8.8.8) with ESMTP id CAA01609; Sat, 21 Aug 1999 02:06:25 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from salsa.gv.tsc.tdk.com (salsa.gv.tsc.tdk.com [192.168.241.194]) by sunrise.gv.tsc.tdk.com (8.8.5/8.8.5) with ESMTP id CAA17965; Sat, 21 Aug 1999 02:06:24 -0700 (PDT) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id CAA17706; Sat, 21 Aug 1999 02:06:23 -0700 (PDT) From: Don Lewis Message-Id: <199908210906.CAA17706@salsa.gv.tsc.tdk.com> Date: Sat, 21 Aug 1999 02:06:23 -0700 In-Reply-To: Wes Peters "mmap mapped segment length" (Aug 21, 2:10am) X-Mailer: Mail User's Shell (7.2.6 alpha(3) 7/19/95) To: Wes Peters , hackers@FreeBSD.ORG Subject: Re: mmap mapped segment length Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message