On Wed, 2013-08-07 at 08:13 -0700, John Reiser wrote: > > Is there any support in memcheck for a client request to treat a block of > > memory as read-only? I know memory can be defined as accessible/not > > accessible or defined/undefined, but I don’t see anything for “writable”. > > It would be really nice to be able to add client requests so that after a > > block of > > memory is initialized, to be able to tell memcheck that certain bytes > > should never be written again, because they have been initialized (e.g. > > pointer to another object). > > No; "read only" is not one of the states in the current memory accounting > info. Effectively. memcheck/mc_main.c gives some background info: Aside: the V+A bits are less precise than they could be -- we have no way of marking memory as read-only. It would be great if we could add an extra state VA_BITSn_READONLY. But then we'd have 5 different states, which requires 2.3 bits to hold, and there's no way to do that elegantly -- we'd have to double up to 4 bits of metadata per byte, which doesn't seem worth it.
------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users