> But then, after you have accounted for all the corner cases, you have reimplemented half of a garbage collector, badly ;)
Ha! manual allocation has two properties that most GCs don't have:
-"real time": time is only spent when you call malloc or free, many GCs can interrupt your software "randomly".
-swap friendly: as the GC access periodically the objects, it interacts with the swap manager, keeping the objects in memory longer than they ought to be.
Posted Apr 20, 2012 16:04 UTC (Fri) by Cyberax (✭ supporter ✭, #52523)
[Link]
>-"real time": time is only spent when you call malloc or free, many GCs can interrupt your software "randomly".
Realtime GCs are certainly possible. http://www.azulsystems.com/ would gladly sell you a system with realtime Java GC suitable for high-frequency trading.
>-swap friendly: as the GC access periodically the objects, it interacts with the swap manager, keeping the objects in memory longer than they ought to be.
That's also possible (in fact, generational GCs are already pretty friendly to swap).
Quotes of the week
Posted Apr 20, 2012 19:35 UTC (Fri) by renox (subscriber, #23785)
[Link]
Re-read what I said: "most GCs", Azul is only one GC, and an expensive one (IBM sell a realtime GC too).
The only Free realtime GC that I know is SuperCollider's GC.
As for generational GC, no it's not in enough to be swap friendly (in general: I don't know about Azul's properties): see the link below which show that a VM aware GC can be much better: http://lambda-the-ultimate.org/node/2391
The author of this research submitted a patch to the Linux kernel which was rejected..
Quotes of the week
Posted Apr 20, 2012 21:28 UTC (Fri) by Cyberax (✭ supporter ✭, #52523)
[Link]
>The only Free realtime GC that I know is SuperCollider's GC.
Oh, there are quite a few of them. But they're unmaintained and/or slow and/or for some obscure academic language.
But ultimately, it's certainly doable. And unlike manual memory management which you have to optimize by hand everywhere, once you have a realtime GC then it can be used for almost all software.
>The author of this research submitted a patch to the Linux kernel which was rejected..
Small wonder. It's ugly as hell and hooks into the lowest VM layers.
Quotes of the week
Posted Apr 22, 2012 2:59 UTC (Sun) by dgm (subscriber, #49227)
[Link]
> once you have a realtime GC then it can be used for almost all software.
So, what's stopping this wonder from fixing Java and all other garbage collected languages? Maybe it's not the panacea you want to believe it is?
Quotes of the week
Posted Apr 22, 2012 3:10 UTC (Sun) by Cyberax (✭ supporter ✭, #52523)
[Link]
It works acceptably fine as it is in the areas it's used.
Java is not really used for desktop apps where low-latency GCs are required. And high-throughput high-latency GCs are generally preferable on servers.
That's also basically the answer to the question: "Why aren't we all using realtime Linux kernel?" And if you really need a realtime GC then there are people who would gladly sell it to you.
Now, there is new research in this area (G1GC in newer SunOracle JDKs). So we're moving in a right direction.