From: Alex Dowad Date: 2012-11-06T03:41:21+09:00 Subject: Re: Ruby under Valgrind shows a ton of memory errors -- normal? Brian Candler wrote in post #1083005: > I believe so. This is "conservative garbage collection" - anything on > the stack which looks like a valid object reference is treated as one, > even if it is actually garbage. It means some objects are 'marked' as in > use, even if they actually aren't. Thanks for the response. I don't think this is relevant to the errors which I mentioned, though. Valgrind is an x86 emulator which can be used to check a program for problems like buffer overruns, freeing a pointer twice, using uninitialized variables, etc. As an example, as it interprets the program one machine instruction at a time, it watches for instructions which read memory locations which were not previously written to. When it executes such an instruction, it prints a warning to STDERR. Run MRI on top of that emulator, and any Ruby program will result in a bunch of warnings that the GC is performing computations based on the values of uninitialized memory. I'm interested in whether the Ruby core team is aware of this and whether it is normal. If not, I will dig deeper. -- Posted via http://www.ruby-forum.com/.