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 QAA15119; Thu, 18 Dec 2003 16:46:10 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA14981 for ; Thu, 18 Dec 2003 16:46:09 +0100 (MET) Received: from alex.baretta.com ([213.255.109.130]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hBIFk9X28662 for ; Thu, 18 Dec 2003 16:46:09 +0100 (MET) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by alex.baretta.com (8.12.8/8.12.8) with ESMTP id hBIFiuLF009558 for ; Thu, 18 Dec 2003 16:44:57 +0100 Message-ID: <3FE1CB78.4060105@baretta.com> Date: Thu, 18 Dec 2003 16:44:56 +0100 From: Alex Baretta User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] Implementation plan for freeing dynamically loaded code References: <87hdzyr1zo.fsf@naked.iki.fi> In-Reply-To: <87hdzyr1zo.fsf@naked.iki.fi> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; baretta:01 baretta:01 caml-list:01 dynamically:01 dynamically:01 bugging:01 toplevellib:01 fork:01 avoided:01 linked:01 ocaml:01 ocaml:01 garbage:01 garbage:01 alex:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Nuutti Kotivuori wrote: > This is an initial outline of an implementation plan for making > dynamically loaded code garbage collectable. ... I've been following this thread with great interest. I hope this plan will work out well and will be accepted by the Great Gurus of Inria. I'm bugging the list to point out that such a solution is also terribly necessary to use ocaml as a scripting language within an application through the Toplevelib. Consider a long-living server application which receives and executes scripts in the form of ocaml source code. Such scripts would be bytecompiled by the toplevellib and linked into the application code. Since this code is not garbage collected, such an approach would lead to a memory leak and to the necessity of periodically "garbage-collecting" entire server processes and fork new ones. This is the approach I have taken in my projects up to now. Yet, I dream that such memory leaks be avoided altogether. Alex ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners