LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-17-2015, 02:14 PM   #1
me011089
LQ Newbie
 
Registered: Jun 2011
Posts: 16

Rep: Reputation: Disabled
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.
 
Old 06-17-2015, 07:36 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
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
 
  


Reply

Tags
heap, memory, process, stack, thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory map or physical address of some memory allocated by malloc demon007 Programming 1 02-04-2012 06:17 AM
shared memory address area in process address space nagaraju1024 Programming 3 02-22-2011 04:49 AM
Application Virtual address space memory allocation - memory does not get free chamara82 Linux - General 4 01-01-2011 08:19 PM
releasing memory allocated to a process aloktiagi Linux - Newbie 1 08-25-2009 06:56 AM
Memory Mapping (same physical address = virtual address) skd.tech Linux - Kernel 7 07-24-2006 11:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration