process memory

Programming, for all ages and all languages.
Post Reply
schannah
Posts: 2
Joined: Sat Dec 01, 2007 10:28 pm

process memory

Post by schannah »

It would be helpful if I could get information on the following

Why does the stack bounds change for a process every time it is restarted on Linux ? Why does it change ?

If I want to capture the heap area of a process through another process which also runs in user level, what would be the best method to do it?

Similarly, if I want to find a process's pending signals through another process, how could I do it.

It would be of great help if I could get help for these

Thanks & Regards
schannah
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

Why I understand how that may be frustrating... I must inform you.

This forum is for people developing "Hobby Operating Systems", Not Linux software.

You might want to try the "General Programming" section instead, or you can try finding the appropriate Linux kernel mailing lists.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
blound
Member
Member
Posts: 70
Joined: Sat Dec 01, 2007 1:36 pm

Re: process memory

Post by blound »

schannah wrote:Why does the stack bounds change for a process every time it is restarted on Linux ? Why does it change?
does bounds mean address? if so its changing every time because of ASLR

This can be turned off by
echo 0 > /proc/sys/kernel/randomize_va_space
The easiest way to get the addresses of another processes heap would be to parse the /proc/<pid>/maps file of the process you want. From there you can use ptrace to read the memory out of the other process into yours.
schannah
Posts: 2
Joined: Sat Dec 01, 2007 10:28 pm

Post by schannah »

Thanks blound ...
The solution looks to be perfect.

Sorry for posting in the wrong forum.

Thanks
schannah
Post Reply