40
votes
7answers
3k views

Why is the finalize method included in Java?

According to this post, we should never rely on the finalize method to be called. So why did Java include it in the programming language at all? It seems like a terrible decision to include in any ...
0
votes
1answer
116 views

Why/how does Java use a controlled mechanism to pause threads for GC?

I know that Java uses a controlled mechanism to allow threads to be paused. If I understood correctly, they put a read from a protected page at the end of e.g. loops, and change the protection of that ...
4
votes
5answers
463 views

Why is there no deterministic object destruction in Java? [duplicate]

I understand and enjoy the benefits of the Garbage Collection in Java. However I don't understand why there is no way in Java to explicitly (and quickly) destroy an object. Surely this could be useful ...
-1
votes
2answers
145 views

Is it possible to implement a native compiler for a 'managed language' such as Java?

In most cases, it is possible to create both a native compiler and an interpreter for a programming language. The compiler would simply convert the source code to machine code, and the interpreter ...
3
votes
5answers
600 views

What exactly is the Garbage Collector in Java?

I think I generally know what the Garbage Collector in Java does, but It's praised a lot, so I thought maybe I'm missing something about it's functionality. What I know is, that the GC takes care of ...
7
votes
5answers
964 views

Why did the team at LMAX use Java and design the architecture to avoid GC at all cost?

Why did the team at LMAX design the LMAX Disruptor in Java but all their design points to minimizing GC use? If one does not want to have GC run then why use a garbage collected language? Their ...
0
votes
1answer
108 views

Multiple Instantiate of 1 class affects memory?

I am currently struggling with memory handling. I have an if statement and each case instantiate a new object from a class. Does this affect the memory allocation in java? switch() { case 1: test t1 ...
25
votes
3answers
2k views

Except garbage collector, what else makes Java a non real time programming language

Except the garbage collector, what are some other features in Java that make it unsuitable for real time programming? On the net, whenever Java vs C++ is discussed with regards to real time ...
5
votes
4answers
915 views

Which part of the Memory is used for the Garbage Collector?

I understand the Heap memory divisions such as Young, tenured and Perm Gen. But I'm just curious from where is the memory used for performing the Garbage Collector itself? Is it from any of these ...
10
votes
6answers
2k views

Should java developers know about garbage collection algorithms?

I have been recently asked in an interview if I know about any garbage collection algorithms. I knew what garbage collection is but I never really thought about learning about garbage collection ...
8
votes
2answers
705 views

Why don't mobile platforms support generational garbage collection?

Both Windows Phone/Xbox and Android lack support for generational garbage collection. This is frustrating for a lot of programmers. There seems to be a legitimate engineering reason to it, but I can't ...
3
votes
2answers
381 views

Best refresher material on Java Garbage Collection? [closed]

I haven't looked at Java Garbage Collection for a while and feel the need for a refresher on it. Anyone recommend a resource or two?