>However, the question is globally: if the lower-level allocator (lower >than this one) returns mmap(,,,MAP_ANONYMOUS,,) then the unconditional >store of 0 causes an immediate dirtying of a page (all MAP_ANONYMOUS >pages initially refer to the _same_ single, zeroed physical page) >with the associated overhead for operating system trap. >(The original poster mentioned this in another reply.) >If the end user of the page never writes to it otherwise >(which happens more often than one might expect naively) >then the immediate store here will waste thousands of cycles.
Effectively. Then an alternate solution is to call the client request VALGRIND_MAKE_MEM_DEFINED in the low level allocator, to mark the pages as defined. This will be a very little cost when not running under Valgrind and will also be more efficient under Valgrind than individually write each byte/integer or whatever. Philippe ____ This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy. Any views expressed in this message are those of the sender. ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
