Date: Fri, 7 Aug 1998 10:37:22 -0600 From: Nate Williams <nate@mt.sri.com> To: Terry Lambert <tlambert@primenet.com> Cc: jdp@polstra.com (John Polstra), chat@FreeBSD.ORG Subject: Re: Heads up on LFS Message-ID: <199808071637.KAA19141@mt.sri.com> In-Reply-To: <199808070157.SAA26484@usr06.primenet.com> References: <199808061603.JAA26197@austin.polstra.com> <199808070157.SAA26484@usr06.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[ 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808071637.KAA19141>