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 SAA17642; Sun, 11 Nov 2001 18:43:13 +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 SAA17454 for ; Sun, 11 Nov 2001 18:43:12 +0100 (MET) Received: from gradient.cis.upenn.edu (GRADIENT.CIS.UPENN.EDU [158.130.67.48]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id fABHhAn04274; Sun, 11 Nov 2001 18:43:10 +0100 (MET) Received: from localhost (localhost [127.0.0.1]) by gradient.cis.upenn.edu (8.10.1/8.10.1) with ESMTP id fABHh9721946; Sun, 11 Nov 2001 12:43:09 -0500 (EST) Date: Sun, 11 Nov 2001 12:43:09 -0500 (EST) From: Alwyn Goodloe To: Xavier Leroy cc: A Joseph Koshy , Subject: Re: [Caml-list] embedded caml? In-Reply-To: <20011111182055.E16307@pauillac.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Xavier, You are probably right BUT many embedded environments are approaching what you describe. J2ME for example is intended to run in such an environment. I've always said anything that Java can do OCAML can do faster with less resources. Also note that OHaskell also seems intended for similar apps. Seems like OCAML would work just as well. Alwyn Goodloe agoodloe@gradient.cis.upenn.edu On Sun, 11 Nov 2001, Xavier Leroy wrote: > > I am trying to get O'Caml to run in an extremely resource constrained > > environment. To this end I am interested in getting the O'Caml > > program to run in as small a memory footprint as possible (GC induced > > latencies are not a problem). > > > > Today using OCaml 3.02 on FreeBSD 4.3, a simple hello world program > > like, >> print_endline "Hello World";; << translates to > > > > o 8554 bytes of interpreter bytecode, and, > > The ocaml bytecode linker, like the C linker, eliminates unused > compilation units; but as soon as you reference a function from the > Pervasives unit (e.g. print_endline), all of Pervasives gets linked > in. It is possible to construct a lightweight version of the standard > library, and/or bypass its use altogether. With that kind of hacks > you could get to less than 1K for "hello world". > > > o 111945 bytes of executable code (using the -custom switch to > > "ocamlc") > > Same answer. Some of the runtime system services (e.g. marshalling, > debugger interface, etc) can be eliminated if you don't need them. > However, more than half of these 111K are composed of the bytecode > interpreter and the GC / memory manager; you can't eliminate those :-) > > > I would like to ask if anyone has considered Caml for embedded > > applications? > > I don't think this has been considered much (unless you count as > "embedded" the Palm Pilot port of Caml Light that Fran=E7ois Rouaix did > a while ago). > > Generally speaking, I think Caml (and especially the Objective Caml > implementation) is not really suitable if you don't have a 32-bit process= or > and at least a few hundred kilobytes of RAM. If your memory > constraints are tighter than this, I'm afraid a lower-level language > is required. > > - Xavier Leroy > ------------------- > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.f= r/FAQ/ > To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.in= ria.fr > ------------------- 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