Re: On Java and C++
"Noah Roberts" <roberts.noah@gmail.com> wrote in message
news:1146244945.179923.238360@v46g2000cwv.googlegroups.com...
Andrey Kuznetsov wrote:
True leaks are just another level - they can appear only if JVM has a
heavy
bug.
Only JVM vendor should/can fix such bugs.
You can't fix JVM, you have to write SSCCE and send it to JVM vendor.
That is a pretty major can't but isn't so different I suppose than a
buggy compiler. However, a buggy compiler could theoretically be fixed
yourself if it is OS. On the other hand even fixing java on a single
platform involves cooperation from Sun does it not? I know there are
licensing issues I just don't know how controlling they are.
No, there's an open source JVM called SableVM. If you find a bug in
SableVM, you can modify it to fix the bug, without dealing with Sun as an
intermediate step. Note though that Sun owns the trademark "Java", and they
allow you to use the term "Java" with your products as long as your products
pass certain well defined tests. For example, if your product is supposed to
be a Java virtual machine, then it must adhere to the appropriate
specifications. SableVM does, so it is legally allowed to call itself a
"JVM". If you modify SableVM so that it doesn't adhere to the specs, then
you can't call your modified product a "JVM" anymore.
You would also necessarily have to get all your users to switch to your
fixed VM. Your fixed compiler just generates a now good executable you
can pass on.
That all depends on OS versions of the compilers and VMs involved...as
is the case in any other proprietery system if you don't have the
source you are at the mercy of the vendor...in other words fucked.
If there's a bug in a JVM which causes a memory leak, that's a bug in
the JVM, and not a bug in the Java Compiler. I guess the equivalent in C++
(or other languages) would be a bug in the OS (Operating System, not Open
Source). You write a C++ program which request the OS to allocate you some
memory, and then you later request for the OS to deallocate that memory. If
the OS doesn't deallocate that memory, then you're fucked.
If it's an open source OS (e.g. Linux), you could fix it, and then ask
all your users to switch their OSes. If it's a closed source one (e.g.
Windows), you could submit a bug report and hope for the best.
- Oliver