From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA10044; Mon, 14 Jan 2002 11:01:35 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA10267 for caml-list@pauillac.inria.fr; Mon, 14 Jan 2002 11:01:35 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA24654 for ; Fri, 11 Jan 2002 22:51:02 +0100 (MET) Received: from tourian.nerim.net (tourian.nerim.net [62.4.16.79]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g0BLp1P03875 for ; Fri, 11 Jan 2002 22:51:02 +0100 (MET) Received: from karryall.nerim.net (aboukir-101-1-1-oandrieu.adsl.nerim.net [62.4.18.180]) by tourian.nerim.net (Postfix) with ESMTP id 49124D913; Fri, 11 Jan 2002 22:51:01 +0100 (CET) Received: by karryall.nerim.net (Postfix, from userid 500) id B111970155; Fri, 11 Jan 2002 22:51:00 +0100 (CET) From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15423.24132.197969.118641@karryall.nerim.net> Date: Fri, 11 Jan 2002 22:51:00 +0100 To: Garry Hodgson , caml-list@inria.fr Subject: Re: [Caml-list] error opening large file In-Reply-To: <3C3F52ED.2F4B0190@sage.att.com> References: <3C3F52ED.2F4B0190@sage.att.com> X-Mailer: VM 7.00 under Emacs 20.7.1 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Garry Hodgson [Friday 11 January 2002] : > > i get the following error when i open a large file (2561435180 bytes): > > let chan = open_in( "com.zone" );; > Uncaught exception: > Sys_error > "com.zone: Value too large for defined data type". > > is there a 2G file size limitation? if so, why? The problem might be with your C library which doesn't use 64 bits file offsets for the usual I/O functions (open, lseek ...). On my redhat 7.2, opening a >2G file works OK. BUT, looking at the ocaml source code, I see that the offset in the file is coded with a 'long' which is a bit problematic. Maybe some I/O funtions with int64 arguments could be added to the standard library (at least for the low-level functions of module Unix) ? Objective Caml version 3.04 # let ic = open_in "hom.genom.fa" ;; val ic : in_channel = # let s = String.make 20 ' ' ;; val s : string = " " # let _ = input ic s 0 20 in s ;; - : string = ">chr10\nCCGTGGTGAAGAC" # in_channel_length ic ;; - : int = -848525384 # -- Olivier ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr