Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
like the title,I want to get the memory of another process(not father process and child process).I want to manager the memory of another process in my code
Posted
Comments
[no name] 27-Jul-12 21:23pm    
"I want to manager the memory"... I kind of doubt that. The other memory should be managing itself without any help. What is it really that you are trying to do?

1 solution

It does not matter if the process is parent or child. All processes are executed in their own memory spaces, isolated. Some address, say, if a variable in one process can be something different in another one, or it would not be a valid address at all. Nevertheless, for debugging and system-level purposes, one process can access memory and even control another process. In Linux, you can use ptrace:
http://www.linuxmanpages.com/man2/ptrace.2.php[^].

—SA
 
Share this answer
 
v2
Comments
Mehdi Gholam 28-Jul-12 1:34am    
5'ed
Sergey Alexandrovich Kryukov 28-Jul-12 23:16pm    
Thank you, Mehdi.
--SA
pasztorpisti 29-Jul-12 13:20pm    
+5 something new for me in linux...
Sergey Alexandrovich Kryukov 29-Jul-12 15:22pm    
Thank you.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900