Tuesday, January 18

Geek

The Difference Between C And Java

When you set the configuration file or command line parameters of a C program to tell it that it can use X amount of memory, it will use X amount of memory, and no more.

When you set the configuration file or command line parameters of a Java program to tell it that it can use X amount of memory, it will do whatever the hell it wants.

This is not intrinsic in the respective languages; rather, it seems to be an emergent property.

Posted by: Pixy Misa at 11:18 PM | Comments (4) | Add Comment | Trackbacks (Suck)
Post contains 90 words, total size 1 kb.

1 I refuse to use the words "Java" and "program" in the same sentence.  Java is the Dartmouth Basic for the object-oriented crowd.

Posted by: dkallen99 at Wednesday, January 19 2011 01:30 AM (1PFDl)

2 I rather liked Java the language, but it is intrinsicly linked to insular culture that leads to all sorts of bad things. Bloat, Ant, WORA all became synonyms with Java. I trace the problem back to Java's origins and lawsuits against Microsoft, and I blame Gosling personally.

Posted by: Pete Zaitcev at Wednesday, January 19 2011 03:38 AM (9KseV)

3 I'm guessing that in the Java command line you are telling the virtual machine how much stack and heap space it can allocate for your Java program. That of course does nothing to restrict how much memory the VM can grab for its own use. Normally that isn't enough to constitute a problem, but depending on what VM you are using and how it is configured, who knows?

Posted by: Jonathan Tappan at Wednesday, January 19 2011 09:18 AM (7wFYN)

4 What I'm finding is that when Java applications let you specify how much memory they can use, they pretty much ignore it.  (Not naming names at this point.)

Limiting the Java runtime itself works, but then when you run out of memory the program dies.  Or corrupts your data.  Or corrupts your data and dies.

Posted by: Pixy Misa at Wednesday, January 19 2011 09:53 AM (PiXy!)

Hide Comments | Add Comment

Comments are disabled. Post is locked.
42kb generated in CPU 0.02, elapsed 0.1747 seconds.
52 queries taking 0.155 seconds, 285 records returned.
Powered by Minx 1.1.6c-pink.