public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* memory function
@ 2004-08-09 12:15 Marcelo Roitburd
  2004-08-09 13:34 ` Eljay Love-Jensen
  2004-08-09 14:56 ` Lars Segerlund
  0 siblings, 2 replies; 3+ messages in thread
From: Marcelo Roitburd @ 2004-08-09 12:15 UTC (permalink / raw)
  To: gcc help


Hi ppl,

I know i wrote before a few time about this , but i need to write  again.

i read a the list at net of the gcc help about this i can't found a real 
something that help me.

i need to know how much memory use each function like a sizeof function , 
that ppl write here before.

if someone can send me some example with use class. i read about mprof 
some one know something like about this? or if gprof have some argument to 
this?

thanks very thanks


-Marcelo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: memory function
  2004-08-09 12:15 memory function Marcelo Roitburd
@ 2004-08-09 13:34 ` Eljay Love-Jensen
  2004-08-09 14:56 ` Lars Segerlund
  1 sibling, 0 replies; 3+ messages in thread
From: Eljay Love-Jensen @ 2004-08-09 13:34 UTC (permalink / raw)
  To: Marcelo Roitburd, gcc help

Hi Marcelo,

In code, there is no language specified reliable way to determine the size
of a function.  There are a few suspect tricks you could try (such as taking
the address of the NEXT function in the source code and subtracting the
address of the function of interest), but they are fraught with danger.

Outside of the code, try using the "nm" and "objdump" commands to peruse the
attributes of your object code.

HTH,
--Eljay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: memory function
  2004-08-09 12:15 memory function Marcelo Roitburd
  2004-08-09 13:34 ` Eljay Love-Jensen
@ 2004-08-09 14:56 ` Lars Segerlund
  1 sibling, 0 replies; 3+ messages in thread
From: Lars Segerlund @ 2004-08-09 14:56 UTC (permalink / raw)
  To: gcc-help


 Hi, you can insert labels into the code at the points you desire ( ie. before and after ) and then resolve them at runtime.

 I did a trick like this in order to place code at a desired location ( stupid linker tricks :-) ... perhaps you should ask on the binutils list ? ).

 I fooled around until I managed to put a marker before and after the code I wanted to run, and then got the addresses at runtime ..

 Just a thought, Lars Segerlund.

 ( ps. I tried to find the code but it's long dead and I can't find it ).


On Mon, 9 Aug 2004 15:06:33 +0300 (IDT)
Marcelo Roitburd <marcelo@jct.ac.il> wrote:

> 
> Hi ppl,
> 
> I know i wrote before a few time about this , but i need to write  again.
> 
> i read a the list at net of the gcc help about this i can't found a real 
> something that help me.
> 
> i need to know how much memory use each function like a sizeof function , 
> that ppl write here before.
> 
> if someone can send me some example with use class. i read about mprof 
> some one know something like about this? or if gprof have some argument to 
> this?
> 
> thanks very thanks
> 
> 
> -Marcelo
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-09 14:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-09 12:15 memory function Marcelo Roitburd
2004-08-09 13:34 ` Eljay Love-Jensen
2004-08-09 14:56 ` Lars Segerlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).