From owner-freebsd-chat Fri Aug 7 09:37:58 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA03453 for freebsd-chat-outgoing; Fri, 7 Aug 1998 09:37:58 -0700 (PDT) (envelope-from owner-freebsd-chat@FreeBSD.ORG) Received: from ns.mt.sri.com (sri-gw.MT.net [206.127.105.141]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA03446 for ; Fri, 7 Aug 1998 09:37:56 -0700 (PDT) (envelope-from nate@mt.sri.com) Received: from mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.8.8/8.8.8) with SMTP id KAA22003; Fri, 7 Aug 1998 10:37:24 -0600 (MDT) (envelope-from nate@rocky.mt.sri.com) Received: by mt.sri.com (SMI-8.6/SMI-SVR4) id KAA19141; Fri, 7 Aug 1998 10:37:22 -0600 Date: Fri, 7 Aug 1998 10:37:22 -0600 Message-Id: <199808071637.KAA19141@mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Terry Lambert Cc: jdp@polstra.com (John Polstra), chat@FreeBSD.ORG Subject: Re: Heads up on LFS In-Reply-To: <199808070157.SAA26484@usr06.primenet.com> References: <199808061603.JAA26197@austin.polstra.com> <199808070157.SAA26484@usr06.primenet.com> X-Mailer: VM 6.29 under 19.15 XEmacs Lucid Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org [ Moving to -chat again ] > > > JAVA has a nasty tendency to leak like a sieve until the GC hits a > > > steady state. As does Modula 3. > > ^^^^^^^^^^^^^^^^ > > > > I don't know what you base that statement on. I have a lot of > > experience writing and using Modula-3 programs, and I've never > > observed the behavior you describe. > > Q1: Is there more than 0 bytes difference between memory > allocated and in use? Are you talking theoretically, or in actual use? Given that Modula-3 and Java are close cousins, I can say with assurance that *most* programs that are highly dynamic (C-use malloc alot, Java-use new alot) use less memory than their appropriate C counterpart, because the GC is *more* effecient than the C programmer at getting rid of unused memory. So in fact, there is *less* memory in use than in a C program. > Q2: If so, how large can this number be under the worst > possible conditions? If you are really careful in C, this number can be larger in Java (and Modula-3 I suspect) by at most the amount of memory you can allocate in 100ms. In C this # would the amount of memory you can allocate in one realloc before the following free is called, so I suspect the results are simliar. > Q3: Is this more memory than is typically found in a > typical embedded ssytem, such as the one found in a > Microwave oven? This is irrelevant to the discussion, since the size/type of the objects being allocated in both applications will be relevant to the embedded system. > Q4: What is the typical target platform for an RT OS, and what > is one of the major target platforms for JAVA? A small (1-2MB memory) box. That is what Personal Java is targetted for. Note, the problem with Java (I can speak for Modula-3 here) in many embedded systems is *NOT* the memory use (far from it), but the timing issues. Java provides no real-hard time response to signals, and really has no way for external inputs to happen in any speed. For a really good discussion of this check out the advanced-java archives on xcf.berkeley.edu from a year or more ago. It has been discussed to death there. > Q5: How provable is a system that depends on garbage collection? They are in use today, being sold as consumer items to real people for real problems. Again, you are obviously speaking out of ignorance, and should go read up on both Java and Modula-3, Garbage collection techniques, and object oriented programming in your spare time. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message