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 CAA14636; Sat, 17 Mar 2001 02:37:10 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 CAA09684 for ; Sat, 17 Mar 2001 02:37:07 +0100 (MET) Received: from localhost.localdomain (s057.dhcp212-109.cybercable.fr [212.198.109.57]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f2H1b6n20014 for ; Sat, 17 Mar 2001 02:37:06 +0100 (MET) Received: from baretta.com (IDENT:alex@localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.9.3/8.9.3) with ESMTP id CAA01966 for ; Sat, 17 Mar 2001 02:35:47 +0100 Message-ID: <3AB2BF73.75CD2B03@baretta.com> Date: Sat, 17 Mar 2001 02:35:47 +0100 From: Alex Baretta X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i586) X-Accept-Language: it, en MIME-Version: 1.0 To: "caml-list@inria.fr" Subject: [Caml-list] "Nasty" functions and memory usage Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I have been waiting some ten minutes or so, now, for my Pentium 200 to calculate the type of nasty function number 5... let f0 = function x,y -> x,y;; let f1 = function x,y -> f1(f0 x, f0 y);; let ... let f5 = function x,y -> f5(f4 x, f4 y);; ... and I have reason to believe I will still have to wait a long long time if I want to see the result. The question is the following: the problem of calculating the type of fN is DSPACE(2**(2**N))-hard, as far as I understand ...(I have evidence, too! The type of f4 was so long it took the machine several minutes only to print it to the screen once it had it calculated.) So how can the memory usage of the ocaml interpreter be constant at 2200Kb? Here's my top screen... 2:31am up 15:37, 5 users, load average: 1.08, 1.05, 0.71 57 processes: 54 sleeping, 3 running, 0 zombie, 0 stopped CPU states: 95.5% user, 4.4% system, 0.0% nice, 0.0% idle Mem: 257720K av, 197864K used, 59856K free, 59456K shrd, 68852K buff Swap: 264804K av, 1848K used, 262956K free 72172K cached PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND 1902 root 19 0 2220 2220 512 R 0 92.1 0.8 16:29 ocaml 1936 root 5 0 868 868 668 S 0 3.7 0.3 0:20 top The value has been constant at least since I started checking it, about ten minutes ago. Please, gurus, explain... Alex ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr