Re:Go: Severe memory problems on 32bit Linux
by r00tbeer on Thursday April 05, 2012 @11:23PM
(#3805850)
I know early JVM garabage collectors were also "conservative", but I don't recall JVMs running into these sorts of problems. Maybe folks are just using more of the 4G address space these days than back in the day of conservative GC JVMs?
[ Parent
| on HN ]
Re:Go: Severe memory problems on 32bit Linux
by akeefer on Friday April 06, 2012 @02:24AM
(#3806206)
Within the JVM, object references are strictly separate from integers. Object references are stored within a structure they call an OOP, short for "ordinary object pointers", and the gc works by inspecting the contents of oops and potentially changing them if objects are moved around in memory (as happens if the gc is moving things between generations, or doing heap compaction). If you're curious about it, you can get some information about OOPs on the page discussing the CompressedOops flag implementation: https://wikis.oracle.com/display/HotSpotInternals/Compressed...
Re:Go: Severe memory problems on 32bit Linux
by kevinpet on Thursday April 05, 2012 @11:49PM
(#3805904)
I've never heard of a JVM that uses this kind of GC. As far as I know, every Sun JVM has used explicit "this is a pointer" to identify things for GC.
Re:Go: Severe memory problems on 32bit Linux
by r00tbeer on Friday April 06, 2012 @12:37PM
(#3807835)
Ah, you're right. Its only the thread stacks that were conservatively scanned, not all of memory (see "Mostly Accurate Stack Scanning" for some indirect evidence of such). Its not clear to me if modern JVMs are still conservatively scanning stacks or not. But clearly its much less of a problem than conservatively scanning all of memory.