LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-22-2008, 12:42 PM   #1
myhouri
LQ Newbie
 
Registered: Jul 2008
Posts: 1

Rep: Reputation: 0
Question How can I determine the memory starting address of my c++ program?


Hello folks,

My multithreded C++ program uses a large amount of memory, but there are no memory leaks.
I tried to find memory leaks using valgrind, but it couldn't find any.
Now, I'm trying to dump the memory used by my program to find out what part of my program uses this amount of memory.
gdb provieds a command "dump [format] memory filename start_addr end_addr" to save the memory into a file.
My question is:
How can I find the starting and the end address of multithreaded C++ program?

Thank you in advance
Yaser
 
Old 07-23-2008, 02:20 AM   #2
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
Take a look at pmap.
 
Old 07-23-2008, 08:50 AM   #3
Marius2
Member
 
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276

Rep: Reputation: 31
How many threads are you using? You should be aware that under linux,
a single thread may be assigned stack space in the vicinity of 10-20MB
(depending on your distribution).
You may want to take a look at ulimit (man ulimit).

HTH
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Program to view the contents of memory at a particular address kushalkoolwal Linux - Software 2 06-04-2008 07:05 PM
How do i determine my IP address? How do i determine my host name? jwymore Linux - Networking 5 02-07-2007 10:57 AM
Can't Determine IP Address basketkase999 Linux - Networking 4 11-20-2005 08:42 PM
How do I determine a computer's IP address? njschroe Linux - General 4 05-04-2005 06:53 AM
Determine IP Address with DHCP rock9604 Linux - General 3 08-20-2004 06:32 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:33 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration