From owner-freebsd-hackers Sat Aug 21 18:43:44 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from metriclient-1.uoregon.edu (metriclient-1.uoregon.edu [128.223.172.1]) by hub.freebsd.org (Postfix) with ESMTP id 5678B14BD4 for ; Sat, 21 Aug 1999 18:43:40 -0700 (PDT) (envelope-from gurney_j@efn.org) Received: (from jmg@localhost) by metriclient-1.uoregon.edu (8.9.1/8.8.7) id SAA01537; Sat, 21 Aug 1999 18:42:47 -0700 (PDT) Message-ID: <19990821184246.00134@hydrogen.fircrest.net> Date: Sat, 21 Aug 1999 18:42:46 -0700 From: John-Mark Gurney To: Wes Peters Cc: hackers@FreeBSD.ORG Subject: Re: mmap mapped segment length References: <199908210906.CAA17706@salsa.gv.tsc.tdk.com> <37BF4C99.67814B7@softweyr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 In-Reply-To: <37BF4C99.67814B7@softweyr.com>; from Wes Peters on Sat, Aug 21, 1999 at 07:04:25PM -0600 Reply-To: John-Mark Gurney Organization: Cu Networking X-Operating-System: FreeBSD 3.0-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Wes Peters scribbled this message on Aug 21: > Now I've got to go figure out what *I've* screwed up. I fstat the file before > mapping it and pass S.st_size as the map length. Is there any reason why > mmap would return non-NULL but map less than the requested size? no, there is NO reason why it wouldn't map the entire 50meg file... I have used ffsrecov w/ a 1.8gig file where I fstat it and map the entire file w/o a problem... also, mmap doesn't return NULL, it returns MAP_FAILED... the code for ffsrecov might give you some hints to make sure you aren't doing anything wrong... -- John-Mark Gurney Voice: +1 541 684 8449 Cu Networking P.O. Box 5693, 97405 "The soul contains in itself the event that shall presently befall it. The event is only the actualizing of its thought." -- Ralph Waldo Emerson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message