473,569 Members | 2,481 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Show all memory occupied by the program

Can you all please suggest a program which tell us the range of memry
addresses occupied by the given c program?

Jun 3 '07 #1
39 3154
Ravi <ra*********@gm ail.comwrites:
Can you all please suggest a program which tell us the range of memry
addresses occupied by the given c program?
It can't be done in portable standard C. Try asking in a newsgroup
that deals with your operating system.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 3 '07 #2
In article <11************ **********@j4g2 000prf.googlegr oups.com>,
Ravi <ra*********@gm ail.comwrote:
>Can you all please suggest a program which tell us the range of memry
addresses occupied by the given c program?
gmemusage

http://techpubs.sgi.com/library/tpl/...t1/gmemusage.z

It is SGI IRIX specific, but you just asked for *a* program, without
indicating anything about the operating systems that are useful
for your purposes.

There is absolutely no way to get information about memory address
ranges through pure C, and it seems highly unlikely that such
a facility would ever be added to C; for one thing, it's kinda
difficult to define what the address ranges should mean for embedded
systems. Information about memory address ranges is inherently system
specific, so you will need to continue your investigations in a
newsgroup that deals with your operating system.

--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers
Jun 3 '07 #3
Ravi wrote:
>
Can you all please suggest a program which tell us the range of
memry addresses occupied by the given c program?
No. Off-topic.

--
<http://www.cs.auckland .ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfoc us.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

Jun 4 '07 #4
In article <11************ **********@j4g2 000prf.googlegr oups.com>, Ravi
<ra*********@gm ail.comwrites
>Can you all please suggest a program which tell us the range of memry
addresses occupied by the given c program?
Try looking at the map file that is output by the compiler.

Ignore the netpolice.
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys. org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Jun 4 '07 #5
In article <ln************ @nuthaus.mib.or g>, Keith Thompson
<ks***@mib.orgw rites
>Ravi <ra*********@gm ail.comwrites:
>Can you all please suggest a program which tell us the range of memry
addresses occupied by the given c program?

It can't be done in portable standard C. Try asking in a newsgroup
that deals with your operating system.
It has nothing to do with the OS it sounds like he is looking for the
map file that the compiler will output.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys. org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Jun 4 '07 #6
In article <qs************ **@phaedsys.dem on.co.uk>,
Chris Hills <ch***@phaedsys .demon.co.ukwro te:
>In article <11************ **********@j4g2 000prf.googlegr oups.com>, Ravi
<ra*********@g mail.comwrites
>>Can you all please suggest a program which tell us the range of memry
addresses occupied by the given c program?
>Try looking at the map file that is output by the compiler.
*What* map file output by the compiler? The compilers I use
(brand name compilers) don't output a map file; the toolsets
include tools to -generate- various forms of memory summaries,
but the compilers don't output memory maps.

Even the advice to look at map files is system specific.
--
All is vanity. -- Ecclesiastes
Jun 4 '07 #7
Chris Hills wrote:
In article <ln************ @nuthaus.mib.or g>, Keith Thompson
<ks***@mib.orgw rites
>Ravi <ra*********@gm ail.comwrites:
>>Can you all please suggest a program which tell us the range of memry
addresses occupied by the given c program?

It can't be done in portable standard C. Try asking in a newsgroup
that deals with your operating system.

It has nothing to do with the OS it sounds like he is looking for the
map file that the compiler will output.
That is, of course, absurd. The output of the compiler tells you
*nothing* about the memory addresses used by the program.
Jun 4 '07 #8
Chris Hills wrote:
In article <11************ **********@j4g2 000prf.googlegr oups.com>, Ravi
<ra*********@gm ail.comwrites
>Can you all please suggest a program which tell us the range of memry
addresses occupied by the given c program?
Try looking at the map file that is output by the compiler.
That is, of course, absurd. The output of the compiler tells you
*nothing* about the memory addresses used by the program.
>
Ignore the netpolice.
More important is to ignore Chris Hills, who obviously knows nothing.
Jun 4 '07 #9
In article <js************ **@phaedsys.dem on.co.uk>,
Chris Hills <ch***@phaedsys .demon.co.ukwro te:
>In article <ln************ @nuthaus.mib.or g>, Keith Thompson
<ks***@mib.org writes
>>Ravi <ra*********@gm ail.comwrites:
>>Can you all please suggest a program which tell us the range of memry
addresses occupied by the given c program?
>>It can't be done in portable standard C. Try asking in a newsgroup
that deals with your operating system.
>It has nothing to do with the OS it sounds like he is looking for the
map file that the compiler will output.
Chris, I was really convinced that you knew better than that.

The OP's question is completely meaningless on some operating systems,
and on some other operating systems none of the major compilers generate
memory maps (though other tools might be able to generate them.)

The question is also not specific enough to be answerable by the
"memory map" pancea. If for a particular program, some of the
variables are tossed into a section marked as Demand Zero Paging,
an other variables are tossed into a section for Block Initialize Data,
and some of the code is put down below the 64K boundary so short addresses
can be used, and if there are unusued gaps between each of these, then
does the OP need to know the start and end of each and every used segment?
If there happen to be 5 unused bytes between the code for one function
and the code for another, is that detail required to be revealed, since
those 5 bytes are -not- part of the range of memory addresses
occupied by that program? Does the OP need to know where each DLL
or DSO will get mapped into in virtual address space? If the OP is
using a malloc that uses mmap() to bring pages into the virtual address
range then the mmap() could "fill in" any space not nailed down, in
which case the "range of memory addressed occupied by the given c program"
could only be determined by -running- the program.
--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers
Jun 4 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3835
by: benevilent | last post by:
Hey, I'm trying to debug the memory allocation in an embedded use of the Python interpreter. The longer I leave my program running the more memory it consumes. The total number of objects in the system is not increasing (many are being allocated and deallocated). Using mtrace I have established that the only memory which is not being
9
2611
by: Birgit Rahm | last post by:
Hello newsgroup, I am a beginner, so I am asking maybe immoderate questions. I want to delete a variable, after filling it with complex objects. How should I do it? e.g. AAA = AAA = Can I 1) AAA =
6
2477
by: Kini | last post by:
In the program below, when the control comes back to the Main program, a considerable amount of memory is still associated with the program. Is this normal? Is it due to repeated generation of MatchCollection objects? This program is a sample of a larger problem I am facing with a document retrieval application. The algorithm is as follows:...
2
1485
by: anand | last post by:
hi, i am fetching data from database using dataadaptor and filling up a dataset. i checked memory usage of the app, and it consumes 50 Mb of RAM for the given amount of data. that is, i checked the memory occupied by the app before and after fetching data. i saved the same amount of data in plain comma separated text file, which...
26
3033
by: Bill Reid | last post by:
Bear with me, as I am not a "professional" programmer, but I was working on part of program that reads parts of four text files into a buffer which I re-allocate the size as I read each file. I read some of the items from the bottom up of the buffer, and some from the top down, moving the bottom items back to the new re-allocated bottom on...
1
2239
by: Lambda | last post by:
I'm trying to develop several interesting components of a simple search engine follow some text books. A book introduces some ways to compress dictionary, allow it to stay on main memory. In the dictionary, is a list of millions of words with related data of several bytes. Word / Term Freq(int) / Pointer to disk file Hello 100
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7982
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.