Quote:
Originally Posted by cvr
how to write a value to a specific memory location in C language
|
You should explain
why you want to do that.
You have asked the kind of question that usually implies a more fundamental misunderstanding. So a direct answer to the question would be useless.
Also, are you aware of the difference between
physical "memory locations" and
virtual "memory locations"?
Almost everything any program does in Linux deals with virtual locations. It is trivial to access (read or write) a specific virtual location in C. But there is almost no possibility that you have a constructive purpose in doing so (as opposed to thinking you want to do so because you misunderstand something more fundamental).
A valid reason to want to access a specific physical location is also unlikely, but not as unlikely. It is harder to access a specific physical location. You need root privileges and then use either the /proc filesystem or other methods of requesting the access through the OS. To give any constructive instructions, we would need to know what/why you actually want to access.