0
$\begingroup$

I am using the Vlagrind lackey tool to examine the full memory reference string of a running computer program and wonder what the difference between a "store" and a "modify" might be - and do these differences reflect a real difference in category of memory manipulation, or are they merely a convenience for the user/programmer of Valgrind's lackey tool?

The comments on the lk_main.c source code give these examples of (a) A store:

movl %eax, (%ebx)

And (b) a modify

incl (%ecx)

I appreciate this is a question about a specific piece of software, but what I really want to know is if it is valid to consider stores and modifies as, in effect "stores" - as much texts on memory seem to regard the two basic operations as load (read) and store (write).

$\endgroup$

closed as off-topic by Raphael Nov 2 '13 at 15:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about software development or programming tools are off-topic here, but can be asked on Stack Overflow." – Raphael
If this question can be reworded to fit the rules in the help center, please edit the question.

2
$\begingroup$

This sounds like a question about the terminology that Valgrind happens to use, more so than a question about fundamental aspects of computer science. I suggest you ask on a Valgrind support forum if you want an authoritative answer.

Based on your examples, it looks like the most likely answer is that the Valgrind folks are using the word "store" to mean "an operation that writes to memory, overwriting in a previous value with a new value that does not depend upon its previous value" while they mean "modify" to mean "an operation that writes to memory, updating its value to a new value that may depend upon the value previously stored in that location". Only Valgrind folks can confirm authoritatively whether this is actually what they mean.

$\endgroup$
1
$\begingroup$

Having waded through the comments in the source code it seems that a "modify" is a combined (perhaps implicit) read and a write - so in the example above, a value is incremented, which implies it is read before it is written to.

So the basic categories of the computer science literature - read and write - are sufficient, though a modify contains both.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.