LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Finding the end address of virtual memory allocated to a process (https://www.linuxquestions.org/questions/linux-newbie-8/finding-the-end-address-of-virtual-memory-allocated-to-a-process-4175545652/)

me011089 06-17-2015 02:14 PM

Finding the end address of virtual memory allocated to a process
 
Hi everyone,
I've a process that does some functions including memory read/write operations. I want a thread to be run within that process which will check if the memory allocated to that process is going to exhaust (say 90% memory used). How I'll get the Start and end address of that virtual memory within that task so that I can calculate the limit for stopping the process (i.e. If memory usage exceeds 90% I'll stop the process)

Any help will be appreciated,
Thanks in advance.

frankbell 06-17-2015 07:36 PM

These articles look as if they might help you get started:
https://www.kernel.org/doc/gorman/ht...rstand007.html
http://www.win.tue.nl/~aeb/linux/lk/lk-9.html

Note that this sort of stuff is way beyond my skill level.

Search string: detect virtual memory addresses linux


All times are GMT -5. The time now is 08:06 PM.